ChaseVictim::OnStart
0x00a2cbb0 · 222 bytes · __thiscall
_ZN11ChaseVictim7OnStartEP8InfectedP6ActionIS0_E
Decompiled
undefined (3 params)
/* ChaseVictim::OnStart(Infected*, Action<Infected>*) */
ChaseVictim * __thiscall ChaseVictim::OnStart(ChaseVictim *this,Infected *param_1,Action *param_2)
{
uint uVar1;
int iVar2;
Action *pAVar3;
undefined *puVar4;
Action *pAVar5;
longdouble lVar6;
iVar2 = CBaseEntity::GetGender((CBaseEntity *)param_2);
if (iVar2 != 0x10) {
iVar2 = CBaseEntity::GetGender((CBaseEntity *)param_2);
pAVar5 = param_2 + 0x1a3c;
if (iVar2 != 0x11) goto LAB_00a2cbdf;
}
uVar1 = *(uint *)(*(int *)(param_1 + 0x34) + 0x34);
if ((((uVar1 == 0xffffffff) ||
(puVar4 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar4 == (undefined *)0xfffffffc)) ||
(*(uint *)(puVar4 + 8) != uVar1 >> 0xc)) || (*(int *)(puVar4 + 4) == 0)) {
pAVar3 = param_2 + 0x1a3c;
}
else {
pAVar5 = param_2 + 0x1a3c;
pAVar3 = pAVar5;
lVar6 = (longdouble)
(**(code **)(*(int *)(param_2 + 0x1a3c) + 300))(pAVar5,*(int *)(puVar4 + 4),pAVar5);
if ((float)lVar6 <= 129600.0) goto LAB_00a2cbdf;
}
CreateAttractGoal((Infected *)param_2);
pAVar5 = pAVar3;
LAB_00a2cbdf:
(**(code **)(*(int *)(param_2 + 0x1a3c) + 0x10c))(pAVar5);
*(undefined4 *)this = 0;
*(undefined4 *)(this + 4) = 0;
*(undefined4 *)(this + 8) = 0;
return this;
}
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.