CNavMesh::CommandNavMarkWalkable
0x0073e730 · 319 bytes · __thiscall
_ZN8CNavMesh22CommandNavMarkWalkableEv
Decompiled
undefined (1 param)
/* CNavMesh::CommandNavMarkWalkable() */
void __thiscall CNavMesh::CommandNavMarkWalkable(CNavMesh *this)
{
char cVar1;
CBaseEntity *this_00;
longdouble lVar2;
float local_34;
float local_30;
undefined4 local_2c;
Vector local_28 [24];
if (*(int *)(nav_edit._28_4_ + 0x30) == 0) {
this_00 = (CBaseEntity *)UTIL_GetListenServerHost();
if (this_00 == (CBaseEntity *)0x0) {
Msg("ERROR: No local player!\n");
return;
}
if (((byte)this_00[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition(this_00);
}
local_30 = *(float *)(this_00 + 0x2e4);
local_34 = *(float *)(this_00 + 0x2e0);
local_2c = *(undefined4 *)(this_00 + 0x2e8);
}
else {
local_30 = *(float *)(this + 0x468);
local_34 = *(float *)(this + 0x464);
local_2c = *(undefined4 *)(this + 0x46c);
}
lVar2 = (longdouble)SnapToGrid(this,local_34,true);
local_34 = (float)lVar2;
lVar2 = (longdouble)SnapToGrid(this,local_30,true);
local_30 = (float)lVar2;
cVar1 = FindGroundForNode(this,(Vector *)&local_34,local_28);
if (cVar1 == '\0') {
Msg("ERROR: Invalid ground position.\n");
return;
}
AddWalkableSeed(this,(Vector *)&local_34,local_28);
Msg("Walkable position marked.\n");
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.