HunterAttack::OnInjured
0x00a9c8b0 · 333 bytes · __cdecl
_ZN12HunterAttack9OnInjuredEP6HunterRK15CTakeDamageInfo
Decompiled
undefined (2 params)
/* HunterAttack::OnInjured(Hunter*, CTakeDamageInfo const&) */
Hunter * HunterAttack::OnInjured(Hunter *param_1,CTakeDamageInfo *param_2)
{
uint uVar1;
char cVar2;
undefined4 *puVar3;
undefined *puVar4;
int in_stack_0000000c;
int in_stack_00000010;
if ((*(byte *)(in_stack_00000010 + 0x48) & 8) == 0) {
uVar1 = *(uint *)(param_2 + 0x34);
if ((((uVar1 != 0xffffffff) &&
(puVar4 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar4 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar4 + 8) == uVar1 >> 0xc)) && (*(int *)(puVar4 + 4) != 0)) {
cVar2 = (**(code **)(*(int *)(in_stack_0000000c + 0x4028) + 0x11c))
(in_stack_0000000c + 0x4028,*(int *)(puVar4 + 4),
*(undefined4 *)(HunterCommittedAttackRange._28_4_ + 0x2c));
if (cVar2 == '\0') goto LAB_00a9c9e0;
}
puVar3 = ::operator_new(0x48);
*(undefined4 *)param_1 = 2;
puVar3[8] = 0;
puVar3[9] = 0;
puVar3[10] = 0;
puVar3[3] = 0;
puVar3[4] = 0;
puVar3[5] = 0;
puVar3[6] = 0;
puVar3[7] = 0;
puVar3[2] = 0;
*(undefined1 *)(puVar3 + 0xc) = 0;
*(undefined1 *)((int)puVar3 + 0x31) = 0;
puVar3[0xb] = 0;
*puVar3 = &PTR__HunterLeapToCover_00d317c8;
puVar3[1] = &PTR__HunterLeapToCover_00d3192c;
puVar3[0xe] = &PTR_NetworkStateChanged_00c0b6e0;
puVar3[0xf] = 0;
puVar3[0x10] = 0xbf800000;
*(undefined4 **)(param_1 + 4) = puVar3;
*(char **)(param_1 + 8) = "Ouch! Fleeing to cover!";
*(undefined4 *)(param_1 + 0xc) = 2;
return param_1;
}
LAB_00a9c9e0:
*(undefined4 *)param_1 = 4;
*(undefined4 *)(param_1 + 4) = 0;
*(undefined4 *)(param_1 + 8) = 0;
*(undefined4 *)(param_1 + 0xc) = 2;
return param_1;
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
used as the SourceMod key — change to fit your plugin's convention
SourceMod library name (server / engine / matchmaking)
Just a Signatures{} block, ready to drop into a gamedata
file. Wire it up in your plugin however you like - SDKCall, DHooks,
raw memory ops, or anything else.
Signatures + Functions block. The plugin uses
DHookCreateFromConf - DHooks reads return type, this-type,
calling convention, and argument types straight from the gamedata. Less
boilerplate in the plugin, types travel with the gamedata.
Gamedata KeyValues
DHooks plugin example
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.