Fixed TOHIT hook issues: added 3 missing hook arguments, fixed incorrect attack type argument being passed to vanilla function, thus potentially breaking vanilla to hit calculations, even when not using any scripts at all

This commit is contained in:
phobos2077
2017-03-18 21:45:28 +07:00
parent c83fe0690b
commit 7bbe84feef
2 changed files with 23 additions and 14 deletions
+3
View File
@@ -84,6 +84,9 @@ int arg1 - The unmodified hit chance
critter arg2 - The attacker
critter arg3 - The target of the attack
int arg4 - The targeted bodypart
int arg5 - Source tile (may differ from attacker's tile, when AI is considering potential fire position)
int arg6 - Attack Type (one of ATKTYPE_*)
int arg7 - Ranged flag (0 or 1, actually passed 1 even for unarmed attacks, may be a vanilla bug)
int ret1 - the new hit chance