CInferno::IsTouching
0x008c7780 · 230 bytes · __thiscall
_ZNK8CInferno10IsTouchingEPK8CNavArea
Decompiled
undefined (2 params)
/* CInferno::IsTouching(CNavArea const*) const */
undefined4 __thiscall CInferno::IsTouching(CInferno *this,CNavArea *param_1)
{
int iVar1;
int iVar2;
float fVar3;
float fVar4;
float fVar5;
float fVar6;
float local_28;
float local_24;
float local_20;
if (param_1 != (CNavArea *)0x0) {
fVar3 = *(float *)(this + 0xb48) + *(float *)(this + 0xb48);
if (*(int *)(this + 0xa44) == 1) {
fVar3 = fVar3 + fVar3;
}
if (0 < *(int *)(this + 0xa40)) {
iVar2 = 0;
do {
CNavArea::GetClosestPointOnArea
(param_1,(Vector *)(*(int *)(this + iVar2 * 4 + 0xa48) + 0xc),(Vector *)&local_28)
;
iVar1 = *(int *)(this + iVar2 * 4 + 0xa48);
fVar4 = local_28 - *(float *)(iVar1 + 0xc);
local_20 = *(float *)(iVar1 + 0x54) + local_20;
fVar5 = local_24 - *(float *)(iVar1 + 0x10);
fVar6 = local_20 - *(float *)(iVar1 + 0x14);
if (fVar4 * fVar4 + fVar5 * fVar5 + fVar6 * fVar6 < fVar3 * fVar3) {
return 1;
}
iVar2 = iVar2 + 1;
} while (iVar2 < *(int *)(this + 0xa40));
}
}
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.