CNavArea::Build
0x006fad30 · 411 bytes · __thiscall
_ZN8CNavArea5BuildEP8CNavNodeS1_S1_S1_
Decompiled
undefined (5 params)
/* CNavArea::Build(CNavNode*, CNavNode*, CNavNode*, CNavNode*) */
void __thiscall
CNavArea::Build(CNavArea *this,CNavNode *param_1,CNavNode *param_2,CNavNode *param_3,
CNavNode *param_4)
{
float fVar1;
float fVar2;
float fVar3;
float fVar4;
float fVar5;
float fVar6;
undefined4 uVar7;
int iVar8;
int iVar9;
int iVar10;
fVar1 = *(float *)param_1;
*(float *)(this + 4) = fVar1;
fVar2 = *(float *)(param_1 + 4);
*(float *)(this + 8) = fVar2;
fVar3 = *(float *)(param_1 + 8);
*(float *)(this + 0xc) = fVar3;
fVar4 = *(float *)param_3;
*(float *)(this + 0x10) = fVar4;
fVar5 = *(float *)(param_3 + 4);
*(float *)(this + 0x14) = fVar5;
fVar6 = *(float *)(param_3 + 8);
*(float *)(this + 0x18) = fVar6;
*(float *)(this + 0x2c) = (fVar4 + fVar1) * 0.5;
*(float *)(this + 0x34) = (fVar3 + fVar6) * 0.5;
*(float *)(this + 0x30) = (fVar5 + fVar2) * 0.5;
*(undefined4 *)(this + 0x24) = *(undefined4 *)(param_2 + 8);
uVar7 = *(undefined4 *)(param_4 + 8);
*(CNavNode **)(this + 0xec) = param_1;
*(CNavNode **)(this + 0xf0) = param_2;
*(undefined4 *)(this + 0x28) = uVar7;
*(CNavNode **)(this + 0xf4) = param_3;
*(CNavNode **)(this + 0xf8) = param_4;
if ((fVar4 - fVar1 <= 0.0) || (fVar5 - fVar2 <= 0.0)) {
*(undefined4 *)(this + 0x20) = 0;
*(undefined4 *)(this + 0x1c) = 0;
}
else {
*(float *)(this + 0x1c) = 1.0 / (fVar4 - fVar1);
*(float *)(this + 0x20) = 1.0 / (fVar5 - fVar2);
}
ComputeMinMaxCornerZ(this);
if ((0.05 <= ABS(*(float *)(this + 0x24) - *(float *)(this + 0x18))) ||
(0.05 <= ABS(*(float *)(this + 0x28) - *(float *)(this + 0x18)))) {
*(uint *)(this + 0x54) = *(uint *)(this + 0x54) & 0xdfffffff;
}
else {
*(uint *)(this + 0x54) = *(uint *)(this + 0x54) | 0x20000000;
}
iVar8 = *(int *)(this + 0xec);
iVar10 = *(int *)(this + 0xf0);
iVar9 = iVar8;
if (iVar8 != *(int *)(this + 0xf8)) {
do {
for (; iVar8 != iVar10; iVar8 = *(int *)(iVar8 + 0x1c)) {
*(CNavArea **)(iVar8 + 0x74) = this;
}
iVar8 = *(int *)(iVar9 + 0x20);
iVar10 = *(int *)(iVar10 + 0x20);
iVar9 = iVar8;
} while (iVar8 != *(int *)(this + 0xf8));
}
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.