SurvivorCloseDoor::OnStart
0x00929d40 · 495 bytes · __thiscall
_ZN17SurvivorCloseDoor7OnStartEP11SurvivorBotP6ActionIS0_E
Decompiled
undefined (3 params)
/* SurvivorCloseDoor::OnStart(SurvivorBot*, Action<SurvivorBot>*) */
void __thiscall
SurvivorCloseDoor::OnStart(SurvivorCloseDoor *this,SurvivorBot *param_1,Action *param_2)
{
code *pcVar1;
uint uVar2;
int iVar3;
Vector *pVVar4;
SurvivorLegsApproach *this_00;
undefined4 *puVar5;
undefined4 uVar6;
undefined *puVar7;
int *piVar8;
longdouble lVar9;
CAI_Concept local_24 [20];
pcVar1 = *(code **)(*(int *)param_2 + 0x7b4);
CAI_Concept::CAI_Concept(local_24,"SurvivorBotMovingToCloseDoorBehindUs");
(*pcVar1)(param_2,local_24,1,0,0,0,0);
lVar9 = (longdouble)CountdownTimer::Now();
if ((float)lVar9 + 5.0 != *(float *)(param_1 + 0x40)) {
(**(code **)(*(int *)(param_1 + 0x38) + 4))(param_1 + 0x38,param_1 + 0x40);
*(float *)(param_1 + 0x40) = (float)lVar9 + 5.0;
}
if (*(float *)(param_1 + 0x3c) != 5.0) {
(**(code **)(*(int *)(param_1 + 0x38) + 4))(param_1 + 0x38,param_1 + 0x3c);
*(undefined4 *)(param_1 + 0x3c) = 0x40a00000;
}
uVar2 = *(uint *)(param_1 + 0x34);
piVar8 = (int *)0x0;
if (((uVar2 != 0xffffffff) &&
(puVar7 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar7 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar7 + 8) == uVar2 >> 0xc)) {
piVar8 = *(int **)(puVar7 + 4);
}
pVVar4 = (Vector *)(**(code **)(*piVar8 + 0x288))(piVar8);
this_00 = ::operator_new(0x9050);
/* try { // try from 00929e3d to 00929e41 has its CatchHandler @ 00929f40 */
SurvivorLegsApproach::SurvivorLegsApproach(this_00,pVVar4);
piVar8 = (int *)(**(code **)(*(int *)param_2 + 0x9a8))(param_2);
if (piVar8[0x18] < 0xf) {
puVar5 = ::operator_new(0x38);
*puVar5 = &PTR__Behavior_00d00308;
puVar5[1] = &PTR__Behavior_00d003d0;
/* try { // try from 00929e86 to 00929e8a has its CatchHandler @ 00929f52 */
CFmtStrN<32>::CFmtStrN((CFmtStrN<32> *)(puVar5 + 3),"%s");
puVar5[2] = this_00;
iVar3 = piVar8[0x18];
piVar8[0x18] = iVar3 + 1;
piVar8[iVar3 + 9] = (int)puVar5;
}
else {
piVar8 = (int *)(**(code **)(*piVar8 + 0xb0))(piVar8);
uVar6 = (**(code **)(*piVar8 + 0x13c))(piVar8);
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;
}
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.