L L4D2node

CNavMesh::CommandNavToggleSelectedSet

0x00710400 · 558 bytes · __thiscall

_ZN8CNavMesh27CommandNavToggleSelectedSetEv

Decompiled

undefined (1 param)

/* CNavMesh::CommandNavToggleSelectedSet() */

void __thiscall CNavMesh::CommandNavToggleSelectedSet(CNavMesh *this)

{
  CBaseEntity *this_00;
  int iVar1;
  int iVar2;
  CUtlMemory<CNavArea*,int> *local_44;
  int local_40;
  CNavArea *local_34;
  int local_30 [8];
  
  this_00 = (CBaseEntity *)UTIL_GetListenServerHost();
  if (this_00 == (CBaseEntity *)0x0) {
    return;
  }
  if (1 < *(uint *)(this + 0x458)) {
    return;
  }
  CBaseEntity::EmitSound(this_00,"EDIT_DELETE",0.0,(float *)0x0);
  local_30[0] = 0;
  local_30[1] = 0;
  local_30[2] = 0;
  local_30[3] = 0;
  local_30[4] = 0;
  if (0 < DAT_00fe6000) {
    local_40 = 0;
    iVar2 = 0;
    do {
      local_34 = *(CNavArea **)(TheNavAreas + iVar2 * 4);
      if (*(int *)(this + 0x4e0) < 1) {
LAB_007104c0:
                    /* try { // try from 007104d4 to 00710621 has its CatchHandler @ 00710631 */
        CUtlVector<CNavArea*,CUtlMemory<CNavArea*,int>>::InsertBefore
                  ((CUtlVector<CNavArea*,CUtlMemory<CNavArea*,int>> *)local_30,local_40,&local_34);
        local_40 = local_30[3];
        if (DAT_00fe6000 <= iVar2 + 1) goto LAB_007105b2;
      }
      else {
        if (local_34 != (CNavArea *)**(int **)(this + 0x4d4)) {
          iVar1 = 0;
          do {
            iVar1 = iVar1 + 1;
            if (iVar1 == *(int *)(this + 0x4e0)) goto LAB_007104c0;
          } while (local_34 != (CNavArea *)(*(int **)(this + 0x4d4))[iVar1]);
        }
        if (DAT_00fe6000 <= iVar2 + 1) goto LAB_007105b2;
      }
      iVar2 = iVar2 + 1;
    } while( true );
  }
  *(undefined4 *)(this + 0x4e0) = 0;
  *(undefined4 *)(this + 0x470) = 0;
  *(undefined4 *)(this + 0x474) = 0;
  *(undefined4 *)(this + 0x478) = 0;
  *(undefined4 *)(this + 0x4bc) = 0;
  *(undefined4 *)(this + 0x4c0) = 0;
  *(undefined4 *)(this + 0x4c4) = 0;
  *(undefined4 *)(this + 0x47c) = 4;
  local_40 = 0;
LAB_00710548:
  local_44 = (CUtlMemory<CNavArea*,int> *)local_30;
  Msg("Selected %d areas.\n",local_40);
  *(undefined4 *)(this + 0x4c4) = 0;
  *(undefined4 *)(this + 0x470) = 0;
  *(undefined4 *)(this + 0x47c) = 4;
  local_30[3] = 0;
  CUtlMemory<CNavArea*,int>::Purge(local_44);
  local_30[4] = local_30[0];
  CUtlMemory<CNavArea*,int>::Purge(local_44);
  return;
LAB_007105b2:
  *(undefined4 *)(this + 0x4e0) = 0;
  *(undefined4 *)(this + 0x470) = 0;
  *(undefined4 *)(this + 0x474) = 0;
  *(undefined4 *)(this + 0x478) = 0;
  *(undefined4 *)(this + 0x4bc) = 0;
  *(undefined4 *)(this + 0x4c0) = 0;
  *(undefined4 *)(this + 0x4c4) = 0;
  *(undefined4 *)(this + 0x47c) = 4;
  if (0 < local_40) {
    iVar2 = 0;
    do {
      AddToSelectedSet(this,*(CNavArea **)(local_30[0] + iVar2 * 4));
      iVar2 = iVar2 + 1;
      local_40 = local_30[3];
    } while (iVar2 < local_30[3]);
  }
  goto LAB_00710548;
}

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)