CNavArea::GetNodes
0x00705a70 · 238 bytes · __thiscall
_ZNK8CNavArea8GetNodesE10NavDirTypeP10CUtlVectorIP8CNavNode10CUtlMemoryIS3_iEE
Decompiled
undefined (3 params)
/* CNavArea::GetNodes(NavDirType, CUtlVector<CNavNode*, CUtlMemory<CNavNode*, int> >*) const */
void __thiscall
CNavArea::GetNodes(CNavArea *this,int param_2,
CUtlVector<CNavNode*,CUtlMemory<CNavNode*,int>> *param_3)
{
int iVar1;
int iVar2;
int iVar3;
CNavNode *local_20 [4];
if (param_3 != (CUtlVector<CNavNode*,CUtlMemory<CNavNode*,int>> *)0x0) {
*(undefined4 *)(param_3 + 0xc) = 0;
if (param_2 == 1) {
iVar1 = 1;
iVar2 = 2;
iVar3 = 2;
}
else if (param_2 < 2) {
if (param_2 != 0) {
return;
}
iVar1 = 0;
iVar2 = 1;
iVar3 = 1;
}
else if (param_2 == 2) {
iVar1 = 3;
iVar2 = 1;
iVar3 = 2;
}
else {
if (param_2 != 3) {
return;
}
iVar1 = 0;
iVar2 = 2;
iVar3 = 3;
}
local_20[0] = *(CNavNode **)(this + iVar1 * 4 + 0xec);
if (local_20[0] != (CNavNode *)0x0) {
iVar1 = 0;
if (local_20[0] != *(CNavNode **)(this + iVar3 * 4 + 0xec)) {
do {
CUtlVector<CNavNode*,CUtlMemory<CNavNode*,int>>::InsertBefore(param_3,iVar1,local_20);
local_20[0] = *(CNavNode **)(local_20[0] + (iVar2 + 4) * 4 + 8);
if (local_20[0] == (CNavNode *)0x0) {
return;
}
iVar1 = *(int *)(param_3 + 0xc);
} while (*(CNavNode **)(this + iVar3 * 4 + 0xec) != local_20[0]);
}
CUtlVector<CNavNode*,CUtlMemory<CNavNode*,int>>::InsertBefore(param_3,iVar1,local_20);
}
}
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.