CFastPointLeafNum::GetLeaf
0x0011c160 · 168 bytes · __thiscall
_ZN17CFastPointLeafNum7GetLeafERK6Vector
Decompiled
undefined (2 params)
/* CFastPointLeafNum::GetLeaf(Vector const&) */
void __thiscall CFastPointLeafNum::GetLeaf(CFastPointLeafNum *this,Vector *param_1)
{
undefined4 uVar1;
float fVar2;
float fVar3;
if ((*(int *)this < 0) || (DAT_00394394 <= *(int *)this)) {
fVar2 = *(float *)param_1;
}
else {
fVar2 = *(float *)param_1;
fVar3 = (*(float *)(param_1 + 8) - *(float *)(this + 0xc)) *
(*(float *)(param_1 + 8) - *(float *)(this + 0xc)) +
(fVar2 - *(float *)(this + 4)) * (fVar2 - *(float *)(this + 4)) +
(*(float *)(param_1 + 4) - *(float *)(this + 8)) *
(*(float *)(param_1 + 4) - *(float *)(this + 8));
if (fVar3 < *(float *)(this + 0x10) || fVar3 == *(float *)(this + 0x10)) {
return;
}
}
*(float *)(this + 4) = fVar2;
*(undefined4 *)(this + 8) = *(undefined4 *)(param_1 + 4);
uVar1 = *(undefined4 *)(param_1 + 8);
*(undefined4 *)(this + 0x10) = 0x6753c21c;
*(undefined4 *)(this + 0xc) = uVar1;
uVar1 = CM_PointLeafnumMinDistSqr_r
((CCollisionBSPData *)&g_BSPData,param_1,0,(float *)(this + 0x10));
*(undefined4 *)this = uVar1;
return;
}
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.