mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Added new HOOK_ONEXPLOSION and a new mode "set_explosion_max_targets" to metarule2_explosions (from Mr.Stalin) (#35)
This commit is contained in:
@@ -57,6 +57,7 @@
|
||||
#define HOOK_EXPLOSIVETIMER (33)
|
||||
#define HOOK_DESCRIPTIONOBJ (34)
|
||||
#define HOOK_USESKILLON (35)
|
||||
#define HOOK_ONEXPLOSION (36)
|
||||
|
||||
//Valid arguments to list_begin
|
||||
#define LIST_CRITTERS (0)
|
||||
@@ -148,6 +149,7 @@
|
||||
#define get_explosion_damage(itemPid) metarule2_explosions(6, itemPid, 0)
|
||||
#define set_dynamite_damage(minDmg, maxDmg) metarule2_explosions(7, minDmg, maxDmg)
|
||||
#define set_plastic_damage(minDmg, maxDmg) metarule2_explosions(8, minDmg, maxDmg)
|
||||
#define set_explosion_max_targets(x) metarule2_explosions(9, x, 0)
|
||||
|
||||
|
||||
#define GAME_MSG_COMBAT (0)
|
||||
|
||||
@@ -561,3 +561,20 @@ int arg3 - skill being used
|
||||
|
||||
int ret1 - a new critter to override the user critter. Pass -1 to cancel the skill use, pass 0 to skip this return value
|
||||
int ret2 - pass 1 to allow the skill being used in combat (only for dude_obj or critter being controlled by the player)
|
||||
|
||||
-------------------------------------------
|
||||
|
||||
HOOK_ONEXPLOSION (hs_onexplosion.int)
|
||||
|
||||
Runs when an explosion occurs and Fallout is checking all the tiles within the explosion radius for targets.
|
||||
The tile checking will be interrupted when 6 additional targets (critters) are received.
|
||||
|
||||
int arg1 - event type: 1 - when the explosion is from an explosive item, 0 - otherwise
|
||||
Critter arg2 - The attacker
|
||||
int arg3 - The tile on which the explosion occurs
|
||||
int arg4 - checked tile within the explosion radius
|
||||
Obj arg5 - first found object on the checked tile as an additional target
|
||||
Critter arg6 - The target critter, may be 0 or equal to the attacker
|
||||
int arg7 - 1 when using throwing weapons (e.g. grenades), 0 otherwise
|
||||
|
||||
int ret1 - overrides the found object on the checked tile, pass 0 to skip the object
|
||||
|
||||
@@ -246,6 +246,9 @@ was made as a dirty easy hack to allow dynamically change some explosion paramet
|
||||
- sets the minimum and maximum damage for Plastic Explosives.
|
||||
- changed damage will be reset each time the player reloads the game.
|
||||
|
||||
> void set_explosion_max_targets(x)
|
||||
- sets the maximum number of additional targets for an explosion, valid range: 1..6 (default is 6)
|
||||
|
||||
|
||||
Some utility/math functions are available:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user