CNavMesh::CommandNavMarkUnnamed
0x0070ce50 · 439 bytes · __thiscall
_ZN8CNavMesh21CommandNavMarkUnnamedEv
Decompiled
undefined (1 param)
/* CNavMesh::CommandNavMarkUnnamed() */
void __thiscall CNavMesh::CommandNavMarkUnnamed(CNavMesh *this)
{
CBaseEntity *this_00;
int iVar1;
int iVar2;
int iVar3;
int *piVar4;
int iVar5;
int iVar6;
this_00 = (CBaseEntity *)UTIL_GetListenServerHost();
if ((this_00 == (CBaseEntity *)0x0) || (*(int *)(this + 0x458) != 0)) {
return;
}
FindActiveNavArea(this);
if (*(int *)(this + 0x474) != 0) {
iVar1 = GetMarkedArea(this);
if (iVar1 == 0) {
*(undefined4 *)(this + 0x4c4) = 0;
iVar1 = DAT_00fe6000;
*(undefined4 *)(this + 0x470) = 0;
*(undefined4 *)(this + 0x47c) = 4;
if (0 < iVar1) {
iVar2 = *TheNavAreas;
if (*(int *)(iVar2 + 0x94) != 0) {
iVar5 = 0;
do {
iVar5 = iVar5 + 1;
if (iVar5 == iVar1) goto LAB_0070cf47;
iVar2 = TheNavAreas[iVar5];
} while (*(int *)(iVar2 + 0x94) != 0);
}
*(int *)(this + 0x470) = iVar2;
}
LAB_0070cf47:
iVar1 = GetMarkedArea(this);
if (iVar1 == 0) {
CBaseEntity::EmitSound(this_00,"EDIT_MARK_UNNAMED.NoMarkedArea",0.0,(float *)0x0);
}
else {
CBaseEntity::EmitSound(this_00,"EDIT_MARK_UNNAMED.MarkedArea",0.0,(float *)0x0);
iVar1 = GetMarkedArea(this);
iVar1 = **(int **)(iVar1 + 0x58);
iVar2 = GetMarkedArea(this);
iVar2 = **(int **)(iVar2 + 0x60);
iVar5 = GetMarkedArea(this);
iVar5 = **(int **)(iVar5 + 0x5c);
iVar3 = GetMarkedArea(this);
if (DAT_00fe6000 < 1) {
iVar6 = 0;
}
else {
iVar6 = 0;
piVar4 = TheNavAreas;
do {
iVar6 = iVar6 + (uint)(*(int *)(*piVar4 + 0x94) == 0);
piVar4 = piVar4 + 1;
} while (piVar4 != TheNavAreas + DAT_00fe6000);
}
Msg("Marked Area is connected to %d other Areas - there are %d total unnamed areas\n",
**(int **)(iVar3 + 100) + iVar1 + iVar2 + iVar5,iVar6);
}
}
else {
CBaseEntity::EmitSound(this_00,"EDIT_MARK_UNNAMED.Enable",0.0,(float *)0x0);
*(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.