L L4D2node

CNavArea::Disconnect

0x006fb4c0 · 151 bytes · __thiscall

_ZN8CNavArea10DisconnectEP10CNavLadder

Decompiled

undefined (2 params)

/* CNavArea::Disconnect(CNavLadder*) */

void __thiscall CNavArea::Disconnect(CNavArea *this,CNavLadder *param_1)

{
  CNavLadder *pCVar1;
  int iVar2;
  int *piVar3;
  int iVar4;
  int iVar5;
  int iVar6;
  
  iVar5 = 0;
  do {
    piVar3 = *(int **)(this + iVar5 * 4 + 0x68);
    iVar4 = *piVar3;
    if (0 < iVar4) {
      pCVar1 = (CNavLadder *)piVar3[1];
      iVar2 = 0;
      while (param_1 != pCVar1) {
        if (iVar2 + 1 == iVar4) goto LAB_006fb4f5;
        pCVar1 = (CNavLadder *)piVar3[iVar2 + 2];
        iVar2 = iVar2 + 1;
      }
      iVar6 = (iVar4 - iVar2) + -1;
      if (0 < iVar6) {
        _V_memmove(piVar3 + iVar2 + 1,piVar3 + iVar2 + 2,iVar6 * 4);
        piVar3 = *(int **)(this + iVar5 * 4 + 0x68);
        iVar4 = *piVar3;
      }
      *piVar3 = iVar4 + -1;
      if (**(int **)(this + iVar5 * 4 + 0x68) == 0) {
        free(*(int **)(this + iVar5 * 4 + 0x68));
        *(undefined4 **)(this + iVar5 * 4 + 0x68) =
             &CUtlVectorUltraConservative<NavLadderConnect,CUtlVectorUltraConservativeAllocator>::
              StaticData()::staticData;
      }
    }
LAB_006fb4f5:
    iVar5 = iVar5 + 1;
    if (iVar5 == 2) {
      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)