CNavMesh::RemoveNavArea
0x00741c70 · 503 bytes · __thiscall
_ZN8CNavMesh13RemoveNavAreaEP8CNavArea
Decompiled
undefined (2 params)
/* CNavMesh::RemoveNavArea(CNavArea*) */
void __thiscall CNavMesh::RemoveNavArea(CNavMesh *this,CNavArea *param_1)
{
uint uVar1;
int iVar2;
int iVar3;
float fVar4;
int local_2c;
int local_28;
CNavArea **local_24;
int local_20;
fVar4 = 1.0 / *(float *)(this + 0x20);
iVar2 = (int)((*(float *)(param_1 + 4) - *(float *)(this + 0x2c)) * fVar4);
if (iVar2 < 0) {
local_2c = 0;
}
else {
local_2c = *(int *)(this + 0x24) + -1;
if (iVar2 < *(int *)(this + 0x24)) {
local_2c = iVar2;
}
}
iVar2 = (int)((*(float *)(param_1 + 8) - *(float *)(this + 0x30)) * fVar4);
if (iVar2 < 0) {
iVar2 = 0;
}
else if (*(int *)(this + 0x28) <= iVar2) {
iVar2 = *(int *)(this + 0x28) + -1;
}
iVar3 = (int)((*(float *)(param_1 + 0x10) - *(float *)(this + 0x2c)) * fVar4);
if (iVar3 < 0) {
local_20 = 0;
}
else {
local_20 = *(int *)(this + 0x24) + -1;
if (iVar3 < *(int *)(this + 0x24)) {
local_20 = iVar3;
}
}
iVar3 = (int)((*(float *)(param_1 + 0x14) - *(float *)(this + 0x30)) * fVar4);
if (iVar3 < 0) {
local_28 = 0;
if (iVar2 < 1) goto LAB_00741d38;
}
else {
local_28 = *(int *)(this + 0x28) + -1;
if (iVar3 < *(int *)(this + 0x28)) {
local_28 = iVar3;
}
if (iVar2 <= local_28) {
LAB_00741d38:
iVar3 = local_2c;
do {
for (; iVar3 <= local_20; iVar3 = iVar3 + 1) {
CUtlVector<CNavArea*,CUtlMemory<CNavArea*,int>>::FindAndRemove
((CUtlVector<CNavArea*,CUtlMemory<CNavArea*,int>> *)
(*(int *)(this + 0xc) + (*(int *)(this + 0x24) * iVar2 + iVar3) * 0x14),
¶m_1);
}
iVar2 = iVar2 + 1;
iVar3 = local_2c;
} while (iVar2 <= local_28);
iVar2 = *(int *)(param_1 + 0x10c);
uVar1 = *(uint *)(param_1 + 0x8c);
goto joined_r0x00741e1e;
}
}
iVar2 = *(int *)(param_1 + 0x10c);
uVar1 = *(uint *)(param_1 + 0x8c);
joined_r0x00741e1e:
if (iVar2 == 0) {
iVar2 = *(int *)(param_1 + 0x110);
*(int *)(this + (uVar1 & 0xff) * 4 + 0x50) = iVar2;
if (iVar2 != 0) {
*(undefined4 *)(iVar2 + 0x10c) = 0;
}
}
else {
*(undefined4 *)(iVar2 + 0x110) = *(undefined4 *)(param_1 + 0x110);
}
local_24 = ¶m_1;
if (*(int *)(param_1 + 0x110) != 0) {
*(undefined4 *)(*(int *)(param_1 + 0x110) + 0x10c) = *(undefined4 *)(param_1 + 0x10c);
}
if (((byte)param_1[0x55] & 1) != 0) {
BuildTransientAreaList(this);
}
CUtlVector<CNavArea*,CUtlMemory<CNavArea*,int>>::FindAndRemove
((CUtlVector<CNavArea*,CUtlMemory<CNavArea*,int>> *)(this + 0x588),local_24);
CUtlVector<CNavArea*,CUtlMemory<CNavArea*,int>>::FindAndRemove
((CUtlVector<CNavArea*,CUtlMemory<CNavArea*,int>> *)(this + 0x5b0),local_24);
*(int *)(this + 0x34) = *(int *)(this + 0x34) + -1;
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.