L L4D2node

CNavMesh::CommandNavTogglePlacePainting

0x0070cd70 · 205 bytes · __thiscall

_ZN8CNavMesh29CommandNavTogglePlacePaintingEv

Decompiled

undefined (1 param)

/* CNavMesh::CommandNavTogglePlacePainting() */

void __thiscall CNavMesh::CommandNavTogglePlacePainting(CNavMesh *this)

{
  CBaseEntity *this_00;
  
  this_00 = (CBaseEntity *)UTIL_GetListenServerHost();
  if ((this_00 != (CBaseEntity *)0x0) && (*(int *)(this + 0x458) == 1)) {
    FindActiveNavArea(this);
    if (*(int *)(this + 0x474) != 0) {
      if (this[0x48c] == (CNavMesh)0x0) {
        this[0x48c] = (CNavMesh)0x1;
        CBaseEntity::EmitSound(this_00,"Bot.EditSwitchOn",0.0,(float *)0x0);
        *(undefined4 *)(*(int *)(this + 0x474) + 0x94) = *(undefined4 *)(TheNavMesh + 0x460);
      }
      else {
        this[0x48c] = (CNavMesh)0x0;
        CBaseEntity::EmitSound(this_00,"Bot.EditSwitchOff",0.0,(float *)0x0);
      }
    }
    *(undefined4 *)(this + 0x4c4) = 0;
    *(undefined4 *)(this + 0x470) = 0;
    *(undefined4 *)(this + 0x47c) = 4;
    return;
  }
  return;
}

SourceMod gamedata

paste into addons/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.



        

        

          

Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.

Return-type handling cheatsheet (DHookReturn)