L L4D2node

CNavMesh::CreateObstacleTopAreas

0x00729fe0 · 282 bytes · __thiscall

_ZN8CNavMesh22CreateObstacleTopAreasEv

Decompiled

undefined (1 param)

/* CNavMesh::CreateObstacleTopAreas() */

void __thiscall CNavMesh::CreateObstacleTopAreas(CNavMesh *this)

{
  int iVar1;
  uint uVar2;
  char cVar3;
  int iVar4;
  int *piVar5;
  int iVar6;
  int iVar7;
  int iVar8;
  int iVar9;
  int iVar10;
  
  if ((0 < DAT_00fe6000) && (iVar9 = *TheNavAreas, (*(uint *)(iVar9 + 0x54) & 0x4002) == 0)) {
    iVar10 = 0;
    do {
      iVar8 = 0;
      do {
        piVar5 = *(int **)(iVar9 + 0x58 + iVar8 * 4);
        iVar1 = *piVar5;
        if (0 < iVar1) {
          iVar7 = 0;
          iVar6 = iVar1;
          do {
            if (iVar6 < 1) {
LAB_0072a04b:
              iVar6 = 0;
              uVar2 = uRam00000054;
            }
            else {
              iVar4 = 0;
              if (iVar7 != 0) {
                do {
                  iVar4 = iVar4 + 1;
                  if (iVar4 == iVar6) goto LAB_0072a04b;
                } while (iVar7 != iVar4);
              }
              iVar6 = piVar5[iVar4 * 2 + 1];
              uVar2 = *(uint *)(iVar6 + 0x54);
            }
            if (((uVar2 & 0x4002) == 0) &&
               (cVar3 = CreateObstacleTopAreaIfNecessary(this,iVar9,iVar6,iVar8,0,iVar10,iVar6),
               cVar3 == '\0')) {
              CreateObstacleTopAreaIfNecessary(this,iVar9,iVar6,iVar8,1);
            }
            if (iVar7 + 1 == iVar1) break;
            iVar7 = iVar7 + 1;
            piVar5 = *(int **)(iVar9 + 0x58 + iVar8 * 4);
            iVar6 = *piVar5;
          } while( true );
        }
        iVar8 = iVar8 + 1;
      } while (iVar8 != 4);
      iVar10 = iVar10 + 1;
    } while ((iVar10 < DAT_00fe6000) &&
            (iVar9 = TheNavAreas[iVar10], (*(uint *)(iVar9 + 0x54) & 0x4002) == 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)