CNavNode::CNavNode
0x00747230 · 583 bytes · __thiscall
_ZN8CNavNodeC2ERK6VectorS2_PS_b
Decompiled
undefined (5 params)
/* CNavNode::CNavNode(Vector const&, Vector const&, CNavNode*, bool) */
void __thiscall
CNavNode::CNavNode(CNavNode *this,Vector *param_1,Vector *param_2,CNavNode *param_3,bool param_4)
{
CUtlVector<CNavNode*,CUtlMemory<CNavNode*,int>> *this_00;
undefined4 *puVar1;
uint uVar2;
float *pfVar3;
CUtlVector<CUtlVector<CNavNode*,CUtlMemory<CNavNode*,int>>,CUtlMemory<CUtlVector<CNavNode*,CUtlMemory<CNavNode*,int>>,int>>
*pCVar4;
CNavNode *pCVar5;
uint uVar6;
CUtlVector<CUtlVector<CNavNode*,CUtlMemory<CNavNode*,int>>,CUtlMemory<CUtlVector<CNavNode*,CUtlMemory<CNavNode*,int>>,int>>
*this_01;
uint uVar7;
int iVar8;
*(undefined4 *)this = *(undefined4 *)param_1;
*(undefined4 *)(this + 4) = *(undefined4 *)(param_1 + 4);
*(undefined4 *)(this + 8) = *(undefined4 *)(param_1 + 8);
*(undefined4 *)(this + 0xc) = *(undefined4 *)param_2;
*(undefined4 *)(this + 0x10) = *(undefined4 *)(param_2 + 4);
*(undefined4 *)(this + 0x14) = *(undefined4 *)(param_2 + 8);
*(int *)(this + 0x58) = m_nextID;
iVar8 = 0;
pCVar5 = this;
m_nextID = m_nextID + 1;
do {
iVar8 = iVar8 + 1;
*(undefined4 *)(pCVar5 + 0x18) = 0;
*(undefined4 *)(pCVar5 + 0x28) = 0;
*(undefined4 *)(pCVar5 + 0x38) = 0;
*(undefined4 *)(pCVar5 + 0x48) = 0;
pCVar5 = pCVar5 + 4;
} while (iVar8 != 4);
this[0x7c] = (CNavNode)0x0;
this_01 = g_pNavNodeHash;
this[0x78] = (CNavNode)0x0;
m_listLength = m_listLength + 1;
this[0x7d] = (CNavNode)0x0;
this[0x79] = (CNavNode)0x0;
*(CNavNode **)(this + 0x6c) = param_3;
this[0x7e] = (CNavNode)0x0;
this[0x7a] = (CNavNode)0x0;
this[0x7f] = (CNavNode)0x0;
this[0x7b] = (CNavNode)0x0;
this[0x68] = (CNavNode)0x0;
*(CNavNode **)(this + 0x60) = m_list;
m_list = this;
this[0x70] = (CNavNode)0x0;
*(undefined4 *)(this + 0x74) = 0;
*(undefined4 *)(this + 0x5c) = 0;
this[0x90] = (CNavNode)param_4;
if (this_01 ==
(CUtlVector<CUtlVector<CNavNode*,CUtlMemory<CNavNode*,int>>,CUtlMemory<CUtlVector<CNavNode*,CUtlMemory<CNavNode*,int>>,int>>
*)0x0) {
this_01 = ::operator_new(0x1c);
*(undefined4 *)this_01 = 0;
*(undefined4 *)(this_01 + 4) = 0;
*(undefined4 *)(this_01 + 8) = 0;
*(undefined4 *)(this_01 + 0xc) = 0;
*(undefined4 *)(this_01 + 0x10) = 0;
/* try { // try from 0074744b to 0074744f has its CatchHandler @ 00747494 */
CUtlVector<CUtlVector<CNavNode*,CUtlMemory<CNavNode*,int>>,CUtlMemory<CUtlVector<CNavNode*,CUtlMemory<CNavNode*,int>>,int>>
::SetCount(this_01,0x4000);
iVar8 = 0;
do {
*(undefined4 *)(*(int *)this_01 + 0xc + iVar8) = 0;
*(undefined4 *)(*(int *)this_01 + 8 + iVar8) = 0;
iVar8 = iVar8 + 0x14;
} while (iVar8 != 0x50000);
this_01[0x16] =
(CUtlVector<CUtlVector<CNavNode*,CUtlMemory<CNavNode*,int>>,CUtlMemory<CUtlVector<CNavNode*,CUtlMemory<CNavNode*,int>>,int>>
)0x1;
*(undefined4 *)(this_01 + 0x18) = 0x3fff;
g_pNavNodeHash = this_01;
}
uVar6 = Hash8(this);
pCVar4 = g_pNavNodeHash;
if (this_01[0x16] ==
(CUtlVector<CUtlVector<CNavNode*,CUtlMemory<CNavNode*,int>>,CUtlMemory<CUtlVector<CNavNode*,CUtlMemory<CNavNode*,int>>,int>>
)0x0) {
uVar6 = uVar6 % *(uint *)(this_01 + 0xc);
}
else {
uVar6 = uVar6 & *(uint *)(this_01 + 0x18);
}
this_00 = (CUtlVector<CNavNode*,CUtlMemory<CNavNode*,int>> *)(*(int *)this_01 + uVar6 * 0x14);
uVar2 = *(uint *)(this_00 + 0xc);
if ((int)uVar2 < 1) {
uVar7 = 0;
LAB_0074737a:
if (uVar2 != uVar7) {
iVar8 = ((uVar6 << 0x10 | uVar7) >> 0x10) * 0x14;
*(undefined4 *)(this + 100) =
*(undefined4 *)(*(int *)(*(int *)g_pNavNodeHash + iVar8) + (uVar7 & 0xffff) * 4);
*(CNavNode **)(*(int *)(*(int *)pCVar4 + iVar8) + (uVar7 & 0xffff) * 4) = this;
return;
}
}
else {
uVar7 = 0;
do {
pfVar3 = *(float **)(*(int *)this_00 + uVar7 * 4);
if ((*(float *)this == *pfVar3) && (pfVar3[1] == *(float *)(this + 4))) goto LAB_0074737a;
uVar7 = uVar7 + 1;
} while (uVar7 != uVar2);
}
CUtlVector<CNavNode*,CUtlMemory<CNavNode*,int>>::GrowVector(this_00,1);
CUtlVector<CNavNode*,CUtlMemory<CNavNode*,int>>::ShiftElementsRight(this_00,uVar2,1);
puVar1 = (undefined4 *)(*(int *)this_00 + uVar2 * 4);
if (puVar1 != (undefined4 *)0x0) {
*puVar1 = this;
}
*(undefined4 *)(this + 100) = 0;
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.