L L4D2node

CNavArea::UpdateOnOpenList

0x006fed70 · 103 bytes · __thiscall

_ZN8CNavArea16UpdateOnOpenListEv

Decompiled

undefined (1 param)

/* CNavArea::UpdateOnOpenList() */

void __thiscall CNavArea::UpdateOnOpenList(CNavArea *this)

{
  int iVar1;
  int iVar2;
  int iVar3;
  CNavArea *pCVar4;
  CNavArea *pCVar5;
  
  do {
    pCVar4 = m_openListTail;
    iVar3 = *(int *)(this + 0x4c);
    pCVar5 = m_openList;
    if (iVar3 == 0) {
      m_openListTail = pCVar4;
      return;
    }
    while( true ) {
      if (*(float *)(iVar3 + 0x40) < *(float *)(this + 0x40) ||
          *(float *)(iVar3 + 0x40) == *(float *)(this + 0x40)) {
        m_openListTail = pCVar4;
        m_openList = pCVar5;
        return;
      }
      iVar1 = *(int *)(iVar3 + 0x4c);
      iVar2 = *(int *)(this + 0x48);
      *(int *)(this + 0x48) = iVar3;
      *(int *)(this + 0x4c) = iVar1;
      *(CNavArea **)(iVar3 + 0x4c) = this;
      *(int *)(iVar3 + 0x48) = iVar2;
      m_openList = this;
      if (iVar1 != 0) {
        *(CNavArea **)(iVar1 + 0x48) = this;
        m_openList = pCVar5;
      }
      m_openListTail = this;
      if (iVar2 == 0) break;
      *(int *)(iVar2 + 0x4c) = iVar3;
      iVar3 = *(int *)(this + 0x4c);
      pCVar5 = m_openList;
      if (iVar3 == 0) {
        m_openListTail = pCVar4;
        return;
      }
    }
  } while( true );
}

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)