mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Added Attack Type argument for HOOK_COMBATDAMAGE (from Crafty) #100
This commit is contained in:
@@ -169,6 +169,7 @@ int arg8 - The bodypart that was struck
|
|||||||
int arg9 - Roll result of the attack (check with is_success, etc functions; basically: 0-crit. fail, 1-fail, 2-success, 3-crit. success)
|
int arg9 - Roll result of the attack (check with is_success, etc functions; basically: 0-crit. fail, 1-fail, 2-success, 3-crit. success)
|
||||||
int arg10 - Number of bullets actually hit the target (1 for melee attacks)
|
int arg10 - Number of bullets actually hit the target (1 for melee attacks)
|
||||||
int arg11 - The amount of knockback to the target
|
int arg11 - The amount of knockback to the target
|
||||||
|
int arg12 - Attack Type (see ATKTYPE_* constants)
|
||||||
|
|
||||||
int ret1 - The damage to the target
|
int ret1 - The damage to the target
|
||||||
int ret2 - The damage to the attacker
|
int ret2 - The damage to the attacker
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ static void __declspec(naked) ComputeDamageHook() {
|
|||||||
jz hookscript;
|
jz hookscript;
|
||||||
inc dword ptr ds : [edx + 0x2c];
|
inc dword ptr ds : [edx + 0x2c];
|
||||||
hookscript:
|
hookscript:
|
||||||
hookbegin(11);
|
hookbegin(12);
|
||||||
mov ebx, [edx + 0x20];
|
mov ebx, [edx + 0x20];
|
||||||
mov args[0x00], ebx;
|
mov args[0x00], ebx;
|
||||||
mov ebx, [edx + 0x00];
|
mov ebx, [edx + 0x00];
|
||||||
@@ -156,6 +156,8 @@ hookscript:
|
|||||||
mov args[0x24], ebx;
|
mov args[0x24], ebx;
|
||||||
mov ebx, [edx + 0x34]; // knockback value
|
mov ebx, [edx + 0x34]; // knockback value
|
||||||
mov args[0x28], ebx;
|
mov args[0x28], ebx;
|
||||||
|
mov ebx, [edx + 0x04]; // attack type
|
||||||
|
mov args[0x2c], ebx;
|
||||||
|
|
||||||
pushad;
|
pushad;
|
||||||
push HOOK_COMBATDAMAGE;
|
push HOOK_COMBATDAMAGE;
|
||||||
|
|||||||
Reference in New Issue
Block a user