CTerrorPlayer::ElectHeroicSurvivorBot
0x009b46f0 · 239 bytes · __thiscall
_ZN13CTerrorPlayer22ElectHeroicSurvivorBotEv
Decompiled
undefined (1 param)
/* CTerrorPlayer::ElectHeroicSurvivorBot() */
int __thiscall CTerrorPlayer::ElectHeroicSurvivorBot(CTerrorPlayer *this)
{
int iVar1;
int iVar2;
char cVar3;
longdouble lVar4;
CTerrorPlayer *local_1c;
int local_18;
undefined4 local_14;
undefined4 local_10;
cVar3 = (**(code **)(*(int *)this + 0x778))(this);
if (cVar3 != '\0') {
local_1c = (CTerrorPlayer *)((uint)local_1c & 0xffffff00);
ForEachSurvivor<AnyHumansInTroubleScan>((AnyHumansInTroubleScan *)&local_1c);
if (local_1c._0_1_ != (AnyHumansInTroubleScan)0x0) {
return 0;
}
}
local_1c = this;
local_18 = 0;
local_14 = 0x4a45c100;
local_10 = 0x4a45c100;
ForEachSurvivor<AvailableHeroScan>((AvailableHeroScan *)&local_1c);
iVar2 = local_18;
if (local_18 != 0) {
iVar1 = local_18 + 0x2ea0;
lVar4 = (longdouble)CountdownTimer::Now();
if ((float)lVar4 + 20.0 != *(float *)(iVar2 + 0x2ea8)) {
(**(code **)(*(int *)(iVar2 + 0x2ea0) + 4))(iVar1,iVar2 + 0x2ea8);
*(float *)(iVar2 + 0x2ea8) = (float)lVar4 + 20.0;
}
if (*(float *)(iVar2 + 0x2ea4) != 20.0) {
(**(code **)(*(int *)(iVar2 + 0x2ea0) + 4))(iVar1,iVar2 + 0x2ea4);
*(undefined4 *)(iVar2 + 0x2ea4) = 0x41a00000;
}
}
return local_18;
}
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.