L L4D2node

CNavArea::DrawConnectedAreas

0x006fea90 · 473 bytes · __thiscall

_ZNK8CNavArea18DrawConnectedAreasEv

Decompiled

undefined (1 param)

/* CNavArea::DrawConnectedAreas() const */

void __thiscall CNavArea::DrawConnectedAreas(CNavArea *this)

{
  CNavLadder *pCVar1;
  int iVar2;
  char cVar3;
  int iVar4;
  int *piVar5;
  int iVar6;
  int iVar7;
  CNavArea *this_00;
  int iVar8;
  undefined4 local_28;
  undefined4 local_24;
  float local_20;
  
  iVar4 = UTIL_GetListenServerHost();
  if (iVar4 != 0) {
    if (*(int *)(TheNavMesh + 0x458) == 1) {
      (**(code **)(*(int *)this + 0x50))(this);
    }
    else {
      (**(code **)(*(int *)this + 0x50))();
      DrawHidingSpots(this);
    }
    piVar5 = *(int **)(this + 0x68);
    iVar4 = 0;
    if (0 < *piVar5) {
      do {
        while( true ) {
          pCVar1 = (CNavLadder *)piVar5[iVar4 + 1];
          CNavLadder::DrawLadder(pCVar1);
          cVar3 = CNavLadder::IsConnected(pCVar1,this,1);
          if (cVar3 != '\0') break;
          local_28 = *(undefined4 *)(pCVar1 + 0x10);
          iVar4 = iVar4 + 1;
          local_24 = *(undefined4 *)(pCVar1 + 0x14);
          local_20 = *(float *)(pCVar1 + 0x18) + 25.0;
          NavDrawLine(this + 0x2c,&local_28,0x11);
          piVar5 = *(int **)(this + 0x68);
          if (*piVar5 <= iVar4) goto LAB_006feb58;
        }
        piVar5 = *(int **)(this + 0x68);
        iVar4 = iVar4 + 1;
      } while (iVar4 < *piVar5);
    }
LAB_006feb58:
    piVar5 = *(int **)(this + 0x6c);
    iVar4 = 0;
    if (0 < *piVar5) {
      do {
        while( true ) {
          pCVar1 = (CNavLadder *)piVar5[iVar4 + 1];
          CNavLadder::DrawLadder(pCVar1);
          cVar3 = CNavLadder::IsConnected(pCVar1,this,0);
          if (cVar3 != '\0') break;
          iVar4 = iVar4 + 1;
          NavDrawLine(this + 0x2c,pCVar1 + 4,0x11);
          piVar5 = *(int **)(this + 0x6c);
          if (*piVar5 <= iVar4) goto LAB_006febc2;
        }
        piVar5 = *(int **)(this + 0x6c);
        iVar4 = iVar4 + 1;
      } while (iVar4 < *piVar5);
    }
LAB_006febc2:
    iVar4 = 0;
    do {
      piVar5 = *(int **)(this + iVar4 * 4 + 0x58);
      iVar2 = *piVar5;
      if (0 < iVar2) {
        iVar8 = 0;
        iVar7 = iVar2;
        do {
          if (iVar7 < 1) {
LAB_006febfb:
            this_00 = (CNavArea *)0x0;
          }
          else {
            iVar6 = 0;
            if (iVar8 != 0) {
              do {
                iVar6 = iVar6 + 1;
                if (iVar6 == iVar7) goto LAB_006febfb;
              } while (iVar8 != iVar6);
            }
            this_00 = (CNavArea *)piVar5[iVar6 * 2 + 1];
          }
          (**(code **)(*(int *)this_00 + 0x50))(this_00);
          if (*(int *)(TheNavMesh + 0x458) != 1) {
            DrawHidingSpots(this_00);
            DrawAreaConnection(this,this_00,iVar4,0x11,0x10);
          }
          iVar8 = iVar8 + 1;
          if (iVar8 == iVar2) break;
          piVar5 = *(int **)(this + iVar4 * 4 + 0x58);
          iVar7 = *piVar5;
        } while( true );
      }
      iVar4 = iVar4 + 1;
    } while (iVar4 != 4);
  }
  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)