Fixed the functions of the engine op_obj_can_see_obj_/op_obj_can_hear_obj_ (#189)

Added one additional argument for the hook HOOK_WITHINPERCEPTION.
This commit is contained in:
Mr.Stalin
2018-08-18 23:56:03 +08:00
committed by NovaRain
parent a7c66685b9
commit 032e1d13f3
4 changed files with 134 additions and 14 deletions
+1
View File
@@ -401,6 +401,7 @@ This is fired after the default calculation is made.
Critter arg1 - Watcher object
Obj arg2 - Target object
int arg3 - Result of vanilla function: 1 - within perception range, 0 - otherwise
int arg4 - The type of the called hook: 1 - from the script function obj_can_see_obj, 2 - from the script function obj_can_hear_obj (need option CanHearObjFix enabled), 0 for all other cases
int ret1 - overrides the returned result of the function: 0 - not in range (can't see), 1 - in range (will see if not blocked), 2 - forced detection (will see regardless, only used in obj_can_see_obj scripting function which is called by every critter in the game)