CNavArea::MergeAdjacentConnections
0x006fd120 · 459 bytes · __thiscall
_ZN8CNavArea24MergeAdjacentConnectionsEPS_
Decompiled
undefined (2 params)
/* CNavArea::MergeAdjacentConnections(CNavArea*) */
void __thiscall CNavArea::MergeAdjacentConnections(CNavArea *this,CNavArea *param_1)
{
CNavArea *pCVar1;
int iVar2;
int *piVar3;
int iVar4;
int iVar5;
int local_20;
iVar5 = 0;
do {
piVar3 = *(int **)(param_1 + iVar5 * 4 + 0x58);
if (0 < *piVar3) {
iVar4 = 0;
do {
pCVar1 = (CNavArea *)piVar3[iVar4 * 2 + 1];
if ((param_1 != pCVar1) && (this != pCVar1)) {
ConnectTo(this,pCVar1,iVar5);
piVar3 = *(int **)(param_1 + iVar5 * 4 + 0x58);
}
iVar4 = iVar4 + 1;
} while (iVar4 < *piVar3);
}
iVar5 = iVar5 + 1;
} while (iVar5 != 4);
Disconnect(this,param_1);
if (0 < DAT_00fe6000) {
local_20 = 0;
do {
while ((pCVar1 = *(CNavArea **)(TheNavAreas + local_20 * 4), pCVar1 == param_1 ||
(pCVar1 == this))) {
local_20 = local_20 + 1;
if (DAT_00fe6000 <= local_20) goto LAB_006fd208;
}
iVar5 = 0;
do {
while( true ) {
piVar3 = *(int **)(pCVar1 + iVar5 * 4 + 0x58);
if (0 < *piVar3) break;
LAB_006fd1f1:
iVar5 = iVar5 + 1;
if (iVar5 == 4) goto LAB_006fd1f9;
}
if (param_1 != (CNavArea *)piVar3[1]) {
iVar4 = 0;
do {
iVar4 = iVar4 + 1;
if (iVar4 == *piVar3) goto LAB_006fd1f1;
} while (param_1 != (CNavArea *)piVar3[iVar4 * 2 + 1]);
}
Disconnect(pCVar1,param_1);
Disconnect(pCVar1,this);
iVar4 = iVar5 + 1;
ConnectTo(pCVar1,this,iVar5);
iVar5 = iVar4;
} while (iVar4 != 4);
LAB_006fd1f9:
local_20 = local_20 + 1;
} while (local_20 < DAT_00fe6000);
}
LAB_006fd208:
iVar5 = 0;
do {
piVar3 = *(int **)(param_1 + iVar5 * 4 + 0x68);
if (0 < *piVar3) {
iVar4 = 0;
do {
iVar2 = iVar4 + 1;
iVar4 = iVar4 + 1;
ConnectTo(this,(CNavLadder *)piVar3[iVar2]);
piVar3 = *(int **)(param_1 + iVar5 * 4 + 0x68);
} while (iVar4 < *piVar3);
}
iVar4 = TheNavMesh;
iVar5 = iVar5 + 1;
} while (iVar5 != 2);
iVar5 = 0;
if (0 < *(int *)(TheNavMesh + 0x51c)) {
do {
while( true ) {
iVar2 = *(int *)(*(int *)(iVar4 + 0x510) + iVar5 * 4);
if (param_1 == *(CNavArea **)(iVar2 + 0x24)) {
*(CNavArea **)(iVar2 + 0x24) = this;
}
if (param_1 == *(CNavArea **)(iVar2 + 0x2c)) {
*(CNavArea **)(iVar2 + 0x2c) = this;
}
if (param_1 == *(CNavArea **)(iVar2 + 0x28)) {
*(CNavArea **)(iVar2 + 0x28) = this;
}
if (param_1 == *(CNavArea **)(iVar2 + 0x30)) {
*(CNavArea **)(iVar2 + 0x30) = this;
}
if (param_1 != *(CNavArea **)(iVar2 + 0x34)) break;
*(CNavArea **)(iVar2 + 0x34) = this;
iVar5 = iVar5 + 1;
if (*(int *)(iVar4 + 0x51c) <= iVar5) {
return;
}
}
iVar5 = iVar5 + 1;
} while (iVar5 < *(int *)(iVar4 + 0x51c));
}
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.