SurvivorApproachMinigun::OnStart
0x009262a0 · 348 bytes · __thiscall
_ZN23SurvivorApproachMinigun7OnStartEP11SurvivorBotP6ActionIS0_E
Decompiled
undefined (3 params)
/* SurvivorApproachMinigun::OnStart(SurvivorBot*, Action<SurvivorBot>*) */
SurvivorApproachMinigun * __thiscall
SurvivorApproachMinigun::OnStart(SurvivorApproachMinigun *this,SurvivorBot *param_1,Action *param_2)
{
uint uVar1;
int iVar2;
Vector *pVVar3;
SurvivorLegsApproach *this_00;
int *piVar4;
undefined4 *puVar5;
undefined4 uVar6;
undefined *puVar7;
uVar1 = *(uint *)(param_1 + 0x34);
if ((((uVar1 != 0xffffffff) &&
(puVar7 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar7 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar7 + 8) == uVar1 >> 0xc)) && (*(int *)(puVar7 + 4) != 0)) {
pVVar3 = (Vector *)(**(code **)(*(int *)param_1 + 0x160))(param_1,param_2);
this_00 = ::operator_new(0x9050);
/* try { // try from 00926334 to 00926338 has its CatchHandler @ 00926407 */
SurvivorLegsApproach::SurvivorLegsApproach(this_00,pVVar3);
piVar4 = (int *)(**(code **)(*(int *)param_2 + 0x9a8))(param_2);
if (piVar4[0x18] < 0xf) {
puVar5 = ::operator_new(0x38);
*puVar5 = &PTR__Behavior_00d00308;
puVar5[1] = &PTR__Behavior_00d003d0;
/* try { // try from 00926384 to 00926388 has its CatchHandler @ 00926419 */
CFmtStrN<32>::CFmtStrN((CFmtStrN<32> *)(puVar5 + 3),"%s");
puVar5[2] = this_00;
iVar2 = piVar4[0x18];
piVar4[0x18] = iVar2 + 1;
piVar4[iVar2 + 9] = (int)puVar5;
}
else {
piVar4 = (int *)(**(code **)(*piVar4 + 0xb0))(piVar4);
uVar6 = (**(code **)(*piVar4 + 0x13c))(piVar4);
DevMsg("%3.2f: %s: PushLegsStack: Overflow\n",(double)*(float *)(gpGlobals + 0xc),uVar6);
if (this_00 != (SurvivorLegsApproach *)0x0) {
(**(code **)(*(int *)this_00 + 4))(this_00);
}
}
*(undefined4 *)this = 0;
*(undefined4 *)(this + 4) = 0;
*(undefined4 *)(this + 8) = 0;
return this;
}
*(undefined4 *)this = 3;
*(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.