SurvivorCheckpointReached::OnStart
0x009174c0 · 524 bytes · __thiscall
_ZN25SurvivorCheckpointReached7OnStartEP11SurvivorBotP6ActionIS0_E
Decompiled
undefined (3 params)
/* SurvivorCheckpointReached::OnStart(SurvivorBot*, Action<SurvivorBot>*) */
void __thiscall
SurvivorCheckpointReached::OnStart
(SurvivorCheckpointReached *this,SurvivorBot *param_1,Action *param_2)
{
float fVar1;
int iVar2;
code *pcVar3;
undefined4 uVar4;
SurvivorLegsWait *this_00;
int *piVar5;
undefined4 *puVar6;
longdouble lVar7;
CAI_Concept local_24 [20];
uVar4 = TerrorNavMesh::GetLastCheckpoint(TheNavMesh);
*(undefined4 *)(param_1 + 0x34) = uVar4;
if (*(float *)(param_1 + 0x40) != -1.0) {
(**(code **)(*(int *)(param_1 + 0x38) + 4))(param_1 + 0x38,param_1 + 0x40);
*(undefined4 *)(param_1 + 0x40) = 0xbf800000;
}
fVar1 = *(float *)(SurvivorBotCloseCheckpointDoorInterval._28_4_ + 0x2c);
lVar7 = (longdouble)CountdownTimer::Now();
if ((float)lVar7 + fVar1 != *(float *)(param_1 + 0x4c)) {
(**(code **)(*(int *)(param_1 + 0x44) + 4))(param_1 + 0x44,param_1 + 0x4c);
*(float *)(param_1 + 0x4c) = (float)lVar7 + fVar1;
}
if (fVar1 != *(float *)(param_1 + 0x48)) {
(**(code **)(*(int *)(param_1 + 0x44) + 4))(param_1 + 0x44,param_1 + 0x48);
*(float *)(param_1 + 0x48) = fVar1;
}
this_00 = ::operator_new(0x44);
/* try { // try from 00917560 to 00917564 has its CatchHandler @ 00917701 */
SurvivorLegsWait::SurvivorLegsWait(this_00,0.0);
piVar5 = (int *)(**(code **)(*(int *)param_2 + 0x9a8))(param_2);
if (piVar5[0x18] < 0xf) {
puVar6 = ::operator_new(0x38);
*puVar6 = &PTR__Behavior_00d00308;
puVar6[1] = &PTR__Behavior_00d003d0;
/* try { // try from 009175ae to 009175b2 has its CatchHandler @ 009176df */
CFmtStrN<32>::CFmtStrN((CFmtStrN<32> *)(puVar6 + 3),"%s");
puVar6[2] = this_00;
iVar2 = piVar5[0x18];
piVar5[0x18] = iVar2 + 1;
piVar5[iVar2 + 9] = (int)puVar6;
}
else {
piVar5 = (int *)(**(code **)(*piVar5 + 0xb0))(piVar5);
uVar4 = (**(code **)(*piVar5 + 0x13c))(piVar5);
DevMsg("%3.2f: %s: PushLegsStack: Overflow\n",(double)*(float *)(gpGlobals + 0xc),uVar4);
if (this_00 != (SurvivorLegsWait *)0x0) {
(**(code **)(*(int *)this_00 + 4))(this_00);
}
}
pcVar3 = *(code **)(*(int *)param_2 + 0x7b4);
CAI_Concept::CAI_Concept(local_24,"SurvivorBotReachedCheckpoint");
(*pcVar3)(param_2,local_24,1,0,0,0,0);
*(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.