L L4D2node

CNavMesh::CommandNavSplice

0x0070ca70 · 285 bytes · __thiscall

_ZN8CNavMesh16CommandNavSpliceEv

Decompiled

undefined (1 param)

/* CNavMesh::CommandNavSplice() */

void __thiscall CNavMesh::CommandNavSplice(CNavMesh *this)

{
  char cVar1;
  CBaseEntity *this_00;
  int iVar2;
  CNavArea *pCVar3;
  
  cVar1 = TestFilesWritable(this);
  if (cVar1 != '\0') {
    this_00 = (CBaseEntity *)UTIL_GetListenServerHost();
    if ((this_00 != (CBaseEntity *)0x0) && (*(int *)(this + 0x458) == 0)) {
      FindActiveNavArea(this);
      if (*(int *)(this + 0x474) != 0) {
        iVar2 = GetMarkedArea(this);
        if (iVar2 == 0) {
          Msg(
             "To splice, mark an area, highlight a second area, then invoke the splice command to create an area between them"
             );
        }
        else {
          pCVar3 = (CNavArea *)GetMarkedArea(this);
          cVar1 = CNavArea::SpliceEdit(*(CNavArea **)(this + 0x474),pCVar3);
          if (cVar1 != '\0') {
            CBaseEntity::EmitSound(this_00,"EDIT_SPLICE.MarkedArea",0.0,(float *)0x0);
            goto LAB_0070cb05;
          }
        }
        CBaseEntity::EmitSound(this_00,"EDIT_SPLICE.NoMarkedArea",0.0,(float *)0x0);
      }
LAB_0070cb05:
      *(undefined4 *)(this + 0x4c4) = 0;
      *(undefined4 *)(this + 0x470) = 0;
      *(undefined4 *)(this + 0x47c) = 4;
      *(undefined4 *)(this + 0x4e0) = 0;
      *(undefined4 *)(this + 0x474) = 0;
      *(undefined4 *)(this + 0x478) = 0;
      *(undefined4 *)(this + 0x4bc) = 0;
      *(undefined4 *)(this + 0x4c0) = 0;
      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)