SurvivorBot::QueryReachableCache
0x0093c5c0 · 229 bytes · __thiscall
_ZNK11SurvivorBot19QueryReachableCacheEP8CNavAreaS1_
Decompiled
undefined (3 params)
/* SurvivorBot::QueryReachableCache(CNavArea*, CNavArea*) const */
uint __thiscall
SurvivorBot::QueryReachableCache(SurvivorBot *this,CNavArea *param_1,CNavArea *param_2)
{
char cVar1;
int *piVar2;
uint uVar3;
float fVar4;
if (((param_1 == (CNavArea *)0x0) || (param_2 == (CNavArea *)0x0)) ||
(cVar1 = CNavArea::IsBlocked(param_2,-1,false), cVar1 != '\0')) {
return 1;
}
if (param_1 == param_2) {
return 0;
}
piVar2 = &m_isReachableCache;
do {
if (((float)piVar2[3] < 0.0) ||
(fVar4 = *(float *)(gpGlobals + 0xc) - (float)piVar2[3],
*(float *)(SurvivorBotReachabilityCacheLifetime._28_4_ + 0x2c) <= fVar4 &&
fVar4 != *(float *)(SurvivorBotReachabilityCacheLifetime._28_4_ + 0x2c))) break;
if ((*(int *)(*piVar2 + 0x8c) == *(int *)(param_1 + 0x8c)) &&
(*(int *)(piVar2[1] + 0x8c) == *(int *)(param_2 + 0x8c))) {
return (uint)(*(byte *)(piVar2 + 2) ^ 1);
}
piVar2 = piVar2 + 4;
} while (piVar2 != (int *)SurvivorBotReachabilityCacheLifetime);
uVar3 = QueryReachableCacheNeighbor(this,param_1,param_2);
return uVar3;
}
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.