Added new HOOK_SNEAK (from Mr.Stalin)

This commit is contained in:
NovaRain
2019-04-10 17:13:00 +08:00
parent 5c3f10db91
commit dcf0561653
7 changed files with 95 additions and 0 deletions
+1
View File
@@ -60,6 +60,7 @@
#define HOOK_ONEXPLOSION (36)
#define HOOK_SUBCOMBATDAMAGE (37)
#define HOOK_SETLIGHTING (38)
#define HOOK_SNEAK (39)
//Valid arguments to list_begin
#define LIST_CRITTERS (0)
+14
View File
@@ -617,3 +617,17 @@ int arg3 - the light radius, or -1 when setting the light level for a map
int ret1 - overrides the light intensity. Intensity range is from 0 to 65536
int ret2 - overrides the light radius. Radius range is from 0 to 8 (works only for the object)
-------------------------------------------
HOOK_SNEAK (hs_sneak.int)
Runs when the Sneak skill is activated, or when the game rolls another Sneak check after the duration for the current one is over.
You can override the result of a random Sneak check or the duration time for the current result.
int arg1 - Sneak check result: 1 - success, 0 - failure
int arg2 - the duration in ticks for the current Sneak check (time is based on the Sneak skill level)
Critter arg3 - the critter (usually dude_obj)
int ret1 - overrides the Sneak check result
int ret2 - overrides the duration time for the current result