CNavMesh::CommandNavSelectInvalidAreas
0x0070f3a0 · 768 bytes · __thiscall
_ZN8CNavMesh28CommandNavSelectInvalidAreasEv
Decompiled
undefined (1 param)
/* CNavMesh::CommandNavSelectInvalidAreas() */
void __thiscall CNavMesh::CommandNavSelectInvalidAreas(CNavMesh *this)
{
float fVar1;
float fVar2;
float fVar3;
float fVar4;
CNavArea *this_00;
char cVar5;
CBaseEntity *this_01;
undefined4 uVar6;
int iVar7;
longdouble lVar8;
float fVar9;
float fVar10;
float fVar11;
float local_54;
float local_34;
float local_30;
float local_28;
float local_24;
this_01 = (CBaseEntity *)UTIL_GetListenServerHost();
if ((this_01 != (CBaseEntity *)0x0) && (*(int *)(this + 0x458) == 0)) {
*(undefined4 *)(this + 0x4e0) = 0;
iVar7 = DAT_00fe6000;
*(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;
if (iVar7 < 1) {
uVar6 = 0;
}
else {
iVar7 = 0;
do {
this_00 = *(CNavArea **)(TheNavAreas + iVar7 * 4);
if (this_00 != (CNavArea *)0x0) {
CNavArea::GetExtent(this_00,(Extent *)&local_34);
local_54 = local_34;
fVar11 = local_54;
while (local_54 = fVar11, fVar11 = local_54 + 25.0, fVar9 = local_30, fVar11 <= local_28)
{
while (fVar10 = fVar9 + 25.0, fVar10 <= local_24) {
lVar8 = (longdouble)CNavArea::GetZ(this_00,local_54,fVar9);
fVar1 = (float)lVar8;
lVar8 = (longdouble)CNavArea::GetZ(this_00,fVar11,fVar9);
fVar2 = (float)lVar8;
lVar8 = (longdouble)CNavArea::GetZ(this_00,local_54,fVar10);
fVar3 = (float)lVar8;
lVar8 = (longdouble)CNavArea::GetZ(this_00,fVar11,fVar10);
fVar4 = (float)lVar8;
cVar5 = IsHeightDifferenceValid(fVar1,fVar2,fVar3,fVar4);
fVar9 = fVar10;
if ((((cVar5 == '\0') ||
(cVar5 = IsHeightDifferenceValid(fVar2,fVar1,fVar3,fVar4), cVar5 == '\0')) ||
(cVar5 = IsHeightDifferenceValid(fVar3,fVar2,fVar1,fVar4), cVar5 == '\0')) ||
(cVar5 = IsHeightDifferenceValid(fVar4,fVar2,fVar3,fVar1), cVar5 == '\0')) {
AddToSelectedSet(this,this_00);
}
}
}
}
iVar7 = iVar7 + 1;
} while (iVar7 < DAT_00fe6000);
uVar6 = *(undefined4 *)(this + 0x4e0);
}
Msg("Selected %d areas.\n",uVar6);
if (*(int *)(this + 0x4e0) == 0) {
CBaseEntity::EmitSound(this_01,"EDIT_MARK.Disable",0.0,(float *)0x0);
return;
}
CBaseEntity::EmitSound(this_01,"EDIT_MARK.Enable",0.0,(float *)0x0);
}
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.