CNavMesh::CommandNavDelete
0x0070dab0 · 707 bytes · __thiscall
_ZN8CNavMesh16CommandNavDeleteEv
Decompiled
undefined (1 param)
/* CNavMesh::CommandNavDelete() */
void __thiscall CNavMesh::CommandNavDelete(CNavMesh *this)
{
undefined4 uVar1;
CNavLadder *this_00;
char cVar2;
CBaseEntity *this_01;
int iVar3;
int iVar4;
CNavLadder *local_20 [4];
cVar2 = TestFilesWritable(this);
if (((cVar2 == '\0') ||
(this_01 = (CBaseEntity *)UTIL_GetListenServerHost(), this_01 == (CBaseEntity *)0x0)) ||
(*(int *)(this + 0x458) != 0)) {
return;
}
if (*(int *)(this + 0x4e0) == 0) {
iVar3 = GetMarkedArea(this);
local_20[0] = *(CNavLadder **)(this + 0x4c4);
FindActiveNavArea(this);
if (iVar3 == 0) {
if (local_20[0] == (CNavLadder *)0x0) {
if (*(int *)(this + 0x474) != 0) {
CBaseEntity::EmitSound(this_01,"EDIT_DELETE",0.0,(float *)0x0);
uVar1 = *(undefined4 *)(this + 0x474);
(**(code **)(*(int *)this + 0x70))(this,uVar1);
(**(code **)(*TheNavMesh + 0x18))(TheNavMesh,uVar1);
goto LAB_0070db58;
}
if (*(int *)(this + 0x4bc) == 0) goto LAB_0070db58;
CBaseEntity::EmitSound(this_01,"EDIT_DELETE",0.0,(float *)0x0);
CUtlVector<CNavLadder*,CUtlMemory<CNavLadder*,int>>::FindAndRemove
((CUtlVector<CNavLadder*,CUtlMemory<CNavLadder*,int>> *)(this + 0x510),
(CNavLadder **)(this + 0x4bc));
this_00 = *(CNavLadder **)(this + 0x4bc);
(**(code **)(*(int *)this + 0x74))(this,this_00);
}
else {
CBaseEntity::EmitSound(this_01,"EDIT_DELETE",0.0,(float *)0x0);
CUtlVector<CNavLadder*,CUtlMemory<CNavLadder*,int>>::FindAndRemove
((CUtlVector<CNavLadder*,CUtlMemory<CNavLadder*,int>> *)(this + 0x510),local_20);
(**(code **)(*(int *)this + 0x74))(this,local_20[0]);
this_00 = local_20[0];
}
if (this_00 != (CNavLadder *)0x0) {
CNavLadder::~CNavLadder(this_00);
operator_delete(this_00);
}
}
else {
CBaseEntity::EmitSound(this_01,"EDIT_DELETE",0.0,(float *)0x0);
(**(code **)(*TheNavMesh + 0x70))(TheNavMesh,iVar3);
(**(code **)(*TheNavMesh + 0x18))(TheNavMesh,iVar3);
}
}
else {
CBaseEntity::EmitSound(this_01,"EDIT_DELETE",0.0,(float *)0x0);
iVar3 = *(int *)(this + 0x4e0);
if (0 < iVar3) {
iVar4 = 0;
do {
uVar1 = *(undefined4 *)(*(int *)(this + 0x4d4) + iVar4 * 4);
iVar4 = iVar4 + 1;
(**(code **)(*(int *)this + 0x70))(this,uVar1);
(**(code **)(*TheNavMesh + 0x18))(TheNavMesh,uVar1);
iVar3 = *(int *)(this + 0x4e0);
} while (iVar4 < iVar3);
}
Msg("Deleted %d areas\n",iVar3);
*(undefined4 *)(this + 0x4e0) = 0;
*(undefined4 *)(this + 0x470) = 0;
*(undefined4 *)(this + 0x474) = 0;
*(undefined4 *)(this + 0x478) = 0;
*(undefined4 *)(this + 0x4bc) = 0;
*(undefined4 *)(this + 0x4c0) = 0;
*(undefined4 *)(this + 0x4c4) = 0;
*(undefined4 *)(this + 0x47c) = 4;
}
LAB_0070db58:
(**(code **)(*(int *)this + 0x84))(this);
*(undefined4 *)(this + 0x4c4) = 0;
*(undefined4 *)(this + 0x470) = 0;
*(undefined4 *)(this + 0x47c) = 4;
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.