L L4D2node

CNavMesh::CommandNavMerge

0x0070c050 · 320 bytes · __thiscall

_ZN8CNavMesh15CommandNavMergeEv

Decompiled

undefined (1 param)

/* CNavMesh::CommandNavMerge() */

void __thiscall CNavMesh::CommandNavMerge(CNavMesh *this)

{
  CNavArea *this_00;
  char cVar1;
  CBaseEntity *this_01;
  CNavArea *pCVar2;
  
  cVar1 = TestFilesWritable(this);
  if (((cVar1 == '\0') ||
      (this_01 = (CBaseEntity *)UTIL_GetListenServerHost(), this_01 == (CBaseEntity *)0x0)) ||
     (*(int *)(this + 0x458) != 0)) {
    return;
  }
  FindActiveNavArea(this);
  this_00 = *(CNavArea **)(this + 0x474);
  if (this_00 != (CNavArea *)0x0) {
    pCVar2 = *(CNavArea **)(this + 0x470);
    if (((pCVar2 == (CNavArea *)0x0) &&
        ((*(int *)(this + 0x4e0) != 1 ||
         (pCVar2 = (CNavArea *)**(int **)(this + 0x4d4), pCVar2 == (CNavArea *)0x0)))) ||
       (pCVar2 == this_00)) {
      Msg("To merge, mark an area, highlight a second area, then invoke the merge command");
    }
    else {
      cVar1 = CNavArea::MergeEdit(this_00,pCVar2);
      if (cVar1 != '\0') {
        CBaseEntity::EmitSound(this_01,"EDIT_MERGE.Enable",0.0,(float *)0x0);
        goto LAB_0070c0dd;
      }
    }
    CBaseEntity::EmitSound(this_01,"EDIT_MERGE.Disable",0.0,(float *)0x0);
  }
LAB_0070c0dd:
  (**(code **)(*(int *)this + 0x84))(this);
  *(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;
}

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)