TerrorNavArea::OnDestroyNotify
0x00985130 · 296 bytes · __thiscall
_ZN13TerrorNavArea15OnDestroyNotifyEP8CNavArea
Decompiled
undefined (2 params)
/* TerrorNavArea::OnDestroyNotify(CNavArea*) */
void __thiscall TerrorNavArea::OnDestroyNotify(TerrorNavArea *this,CNavArea *param_1)
{
int iVar1;
ushort *puVar2;
CNavArea *pCVar3;
int iVar4;
int iVar5;
CNavArea::OnDestroyNotify((CNavArea *)this,param_1);
if (*(int *)(TheNavMesh + 0x528) != 0) {
return;
}
if (((uint)param_1 & 3) != 0) {
Error("Bad nav area pointer");
}
iVar1 = *(int *)(this + 0x13c);
if (iVar1 < 1) {
LAB_009851bb:
pCVar3 = *(CNavArea **)(this + 0x130);
}
else {
puVar2 = *(ushort **)(this + 0x134);
iVar5 = *(int *)(TheNavAreas + (*(ushort *)(param_1 + 0x90) & 0x3fff) * 4);
iVar4 = 0;
if (*(int *)(TheNavAreas + ((int)(uint)*puVar2 >> 2) * 4) != iVar5) {
do {
iVar4 = iVar4 + 1;
if (iVar4 == iVar1) goto LAB_009851bb;
} while (*(int *)(TheNavAreas + ((int)(uint)puVar2[iVar4] >> 2) * 4) != iVar5);
if (iVar4 == -1) goto LAB_009851bb;
}
iVar5 = (iVar1 - iVar4) + -1;
if (iVar5 < 1) {
*(int *)(this + 0x13c) = iVar1 + -1;
}
else {
_V_memmove(puVar2 + iVar4,puVar2 + iVar4 + 1,iVar5 * 2);
*(int *)(this + 0x13c) = *(int *)(this + 0x13c) + -1;
}
pCVar3 = *(CNavArea **)(this + 0x130);
}
if (param_1 != pCVar3) {
return;
}
*(undefined4 *)(this + 0x130) = 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.