Path::FindNextOccludedNode
0x00761a60 · 279 bytes · __thiscall
_ZN4Path20FindNextOccludedNodeEP8INextBoti
Decompiled
undefined (3 params)
/* Path::FindNextOccludedNode(INextBot*, int) */
int __thiscall Path::FindNextOccludedNode(Path *this,INextBot *param_1,int param_2)
{
int iVar1;
char cVar2;
int *piVar3;
Path *pPVar4;
Path *pPVar5;
int iVar6;
piVar3 = (int *)(**(code **)(*(int *)param_1 + 0xc0))(param_1);
if (piVar3 == (int *)0x0) {
return *(int *)(this + 0x4404);
}
iVar1 = param_2 + 1;
iVar6 = *(int *)(this + 0x4404);
if (((iVar1 < *(int *)(this + 0x4404)) &&
(iVar6 = iVar1, *(int *)(this + iVar1 * 0x44 + 0x1c) == 0)) &&
((*(byte *)(*(int *)(this + iVar1 * 0x44 + 4) + 0x54) & 4) == 0)) {
pPVar4 = this + iVar1 * 0x44 + 4;
pPVar5 = this + (param_2 + 2) * 0x44 + 4;
while( true ) {
cVar2 = (**(code **)(*piVar3 + 0x158))(piVar3,this + param_2 * 0x44 + 0xc,pPVar4 + 8,0,0);
if ((cVar2 == '\0') ||
(cVar2 = (**(code **)(*piVar3 + 0x15c))(piVar3,this + param_2 * 0x44 + 0xc,pPVar4 + 8,0),
cVar2 != '\0')) break;
iVar6 = iVar6 + 1;
if (*(int *)(this + 0x4404) <= iVar6) {
return *(int *)(this + 0x4404);
}
if (*(int *)(pPVar5 + 0x18) != 0) {
return iVar6;
}
iVar1 = *(int *)pPVar5;
pPVar4 = pPVar5;
pPVar5 = pPVar5 + 0x44;
if ((*(byte *)(iVar1 + 0x54) & 4) != 0) {
return iVar6;
}
}
}
return iVar6;
}
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.