CNavArea::IsHidingSpotCollision
0x006ff100 · 124 bytes · __thiscall
_ZNK8CNavArea21IsHidingSpotCollisionERK6Vector
Decompiled
undefined (2 params)
/* CNavArea::IsHidingSpotCollision(Vector const&) const */
undefined4 __thiscall CNavArea::IsHidingSpotCollision(CNavArea *this,Vector *param_1)
{
int iVar1;
int iVar2;
int iVar3;
float fVar4;
float fVar5;
float fVar6;
iVar1 = **(int **)(this + 0xcc);
if (0 < iVar1) {
iVar3 = 0;
do {
iVar2 = (*(int **)(this + 0xcc))[iVar3 + 1];
fVar4 = *(float *)(iVar2 + 4) - *(float *)param_1;
fVar6 = *(float *)(iVar2 + 8) - *(float *)(param_1 + 4);
fVar5 = *(float *)(iVar2 + 0xc) - *(float *)(param_1 + 8);
if (fVar4 * fVar4 + fVar6 * fVar6 + fVar5 * fVar5 < 900.0) {
return 1;
}
iVar3 = iVar3 + 1;
} while (iVar3 != iVar1);
}
return 0;
}
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.