SurvivorUseObject::OnInjured
0x00936100 · 288 bytes · __cdecl
_ZN17SurvivorUseObject9OnInjuredEP11SurvivorBotRK15CTakeDamageInfo
Decompiled
undefined (2 params)
/* SurvivorUseObject::OnInjured(SurvivorBot*, CTakeDamageInfo const&) */
SurvivorBot * SurvivorUseObject::OnInjured(SurvivorBot *param_1,CTakeDamageInfo *param_2)
{
uint uVar1;
code *pcVar2;
int *piVar3;
int *piVar4;
undefined4 uVar5;
undefined *puVar6;
int *in_stack_0000000c;
int in_stack_00000010;
uVar1 = *(uint *)(in_stack_00000010 + 0x34);
if ((((uVar1 != 0xffffffff) &&
(puVar6 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar6 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar6 + 8) == uVar1 >> 0xc)) && (*(int *)(puVar6 + 4) != 0)) {
piVar3 = (int *)(**(code **)(*in_stack_0000000c + 0x9a4))();
uVar1 = *(uint *)(in_stack_00000010 + 0x34);
pcVar2 = *(code **)(*piVar3 + 0xc0);
if (((uVar1 == 0xffffffff) ||
(puVar6 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar6 == (undefined *)0xfffffffc)) ||
(*(uint *)(puVar6 + 8) != uVar1 >> 0xc)) {
piVar4 = (int *)0x0;
}
else {
piVar4 = *(int **)(puVar6 + 4);
}
uVar5 = (**(code **)(*piVar4 + 0x288))(piVar4);
(*pcVar2)(piVar3,uVar5,2,0x40000000,0,"Looking at attacker",1,0x3e800000);
*(undefined4 *)param_1 = 3;
*(undefined4 *)(param_1 + 4) = 0;
*(undefined4 *)(param_1 + 8) = 0;
*(undefined4 *)(param_1 + 0xc) = 3;
return param_1;
}
*(undefined4 *)param_1 = 0;
*(undefined4 *)(param_1 + 4) = 0;
*(undefined4 *)(param_1 + 8) = 0;
*(undefined4 *)(param_1 + 0xc) = 1;
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.