SurvivorBot::IsAvailable
0x00938990 · 194 bytes · __thiscall
_ZNK11SurvivorBot11IsAvailableEv
Decompiled
undefined (1 param)
/* SurvivorBot::IsAvailable() const */
undefined4 __thiscall SurvivorBot::IsAvailable(SurvivorBot *this)
{
uint uVar1;
CBaseCombatCharacter *pCVar2;
char cVar3;
int iVar4;
undefined4 uVar5;
SurvivorIntention *this_00;
undefined *puVar6;
longdouble lVar7;
lVar7 = (longdouble)CTerrorPlayer::GetTimeSinceAttackedByEnemy((CTerrorPlayer *)this);
if (((float)lVar7 < 1.0) &&
(cVar3 = CTerrorPlayer::IsBeingHeroic((CTerrorPlayer *)this), cVar3 == '\0')) {
return 0;
}
iVar4 = (**(code **)(*(int *)this + 0x9a8))(this);
if ((((0 < *(int *)(iVar4 + 0x70)) && (uVar1 = **(uint **)(iVar4 + 100), uVar1 != 0xffffffff)) &&
(puVar6 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar6 != (undefined *)0xfffffffc)) &&
((*(uint *)(puVar6 + 8) == uVar1 >> 0xc &&
(pCVar2 = *(CBaseCombatCharacter **)(puVar6 + 4), pCVar2 != (CBaseCombatCharacter *)0x0)))) {
this_00 = (SurvivorIntention *)(**(code **)(*(int *)this + 0x9a8))(this);
cVar3 = SurvivorIntention::IsImmediatelyDangerousTo(this_00,(CTerrorPlayer *)this,pCVar2);
if (cVar3 != '\0') {
return 0;
}
}
uVar5 = CTerrorPlayer::IsAbleToMove((CTerrorPlayer *)this);
return uVar5;
}
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.