L L4D2node

TerrorNavMesh::PostLoadEntityScan

0x00977760 · 840 bytes · __thiscall

_ZN13TerrorNavMesh18PostLoadEntityScanEv

Decompiled

undefined (1 param)

/* TerrorNavMesh::PostLoadEntityScan() */

void __thiscall TerrorNavMesh::PostLoadEntityScan(TerrorNavMesh *this)

{
  char *pcVar1;
  int iVar2;
  undefined1 *puVar3;
  CBaseEntity *pCVar4;
  CBaseEntity *pCVar5;
  double dVar6;
  double dVar7;
  
  pCVar5 = (CBaseEntity *)0x0;
  ZombieDebugPrint(0,"Flow Debug...\n");
LAB_00977790:
  pCVar5 = (CBaseEntity *)
           CGlobalEntityList::FindEntityByClassname
                     ((CGlobalEntityList *)gEntList,pCVar5,"prop_door*");
  if (pCVar5 != (CBaseEntity *)0x0) {
    (**(code **)(*(int *)this + 0x98))(this,pCVar5);
    pcVar1 = *(char **)(pCVar5 + 0x154);
    if (pcVar1 == (char *)0x0) {
      pcVar1 = "";
    }
    iVar2 = _V_stricmp("checkpoint_exit",pcVar1);
    if (iVar2 != 0) goto code_r0x009777e0;
    goto LAB_009777ff;
  }
  pCVar5 = (CBaseEntity *)0x0;
LAB_009778d8:
  pCVar5 = (CBaseEntity *)
           CGlobalEntityList::FindEntityByClassname
                     ((CGlobalEntityList *)gEntList,pCVar5,"func_door*");
  if (pCVar5 == (CBaseEntity *)0x0) {
    pCVar5 = (CBaseEntity *)0x0;
    while( true ) {
      pCVar5 = (CBaseEntity *)
               CGlobalEntityList::FindEntityByClassname
                         ((CGlobalEntityList *)gEntList,pCVar5,"prop_physics");
      pCVar4 = (CBaseEntity *)0x0;
      if (pCVar5 == (CBaseEntity *)0x0) break;
      if ((*(int *)(pCVar5 + 0x100) != 0) && ((*(uint *)(pCVar5 + 0x148) & 0x3000) != 0)) {
        (**(code **)(*(int *)this + 0x54))(this,pCVar5);
      }
    }
    while( true ) {
      pCVar4 = (CBaseEntity *)
               CGlobalEntityList::FindEntityByClassname
                         ((CGlobalEntityList *)gEntList,pCVar4,"func_breakable");
      if (pCVar4 == (CBaseEntity *)0x0) break;
      if ((*(int *)(pCVar4 + 0x100) != 0) && ((*(uint *)(pCVar4 + 0x148) & 0x3000) != 0)) {
        (**(code **)(*(int *)this + 0x54))(this,pCVar4);
      }
    }
    return;
  }
  (**(code **)(*(int *)this + 0x98))(this,pCVar5);
  pcVar1 = *(char **)(pCVar5 + 0x154);
  if (pcVar1 == (char *)0x0) {
    pcVar1 = "";
  }
  iVar2 = _V_stricmp("checkpoint_exit",pcVar1);
  if (iVar2 != 0) goto code_r0x00977928;
  goto LAB_00977947;
code_r0x00977928:
  pcVar1 = *(char **)(pCVar5 + 0x154);
  if (pcVar1 == (char *)0x0) {
    pcVar1 = "";
  }
  iVar2 = _V_stricmp("checkpoint_entrance",pcVar1);
  if (iVar2 != 0) goto LAB_009778d8;
LAB_00977947:
  if (((byte)pCVar5[0x14d] & 8) == 0) {
    dVar7 = (double)*(float *)(pCVar5 + 0x2e8);
  }
  else {
    CBaseEntity::CalcAbsolutePosition(pCVar5);
    dVar7 = (double)*(float *)(pCVar5 + 0x2e8);
    if (((byte)pCVar5[0x14d] & 8) != 0) {
      CBaseEntity::CalcAbsolutePosition(pCVar5);
      dVar6 = (double)*(float *)(pCVar5 + 0x2e4);
      if (((byte)pCVar5[0x14d] & 8) != 0) {
        CBaseEntity::CalcAbsolutePosition(pCVar5);
      }
      goto LAB_00977966;
    }
  }
  dVar6 = (double)*(float *)(pCVar5 + 0x2e4);
LAB_00977966:
  puVar3 = *(undefined1 **)(pCVar5 + 0x154);
  if (puVar3 == (undefined1 *)0x0) {
    puVar3 = &DAT_00d539c2;
  }
  ZombieDebugPrint(1,"Door(func): %s (%f %f %f)\n",puVar3,(double)*(float *)(pCVar5 + 0x2e0),dVar6,
                   dVar7);
  goto LAB_009778d8;
code_r0x009777e0:
  pcVar1 = *(char **)(pCVar5 + 0x154);
  if (pcVar1 == (char *)0x0) {
    pcVar1 = "";
  }
  iVar2 = _V_stricmp("checkpoint_entrance",pcVar1);
  if (iVar2 != 0) goto LAB_00977790;
LAB_009777ff:
  if (((byte)pCVar5[0x14d] & 8) == 0) {
    dVar7 = (double)*(float *)(pCVar5 + 0x2e8);
  }
  else {
    CBaseEntity::CalcAbsolutePosition(pCVar5);
    dVar7 = (double)*(float *)(pCVar5 + 0x2e8);
    if (((byte)pCVar5[0x14d] & 8) != 0) {
      CBaseEntity::CalcAbsolutePosition(pCVar5);
      dVar6 = (double)*(float *)(pCVar5 + 0x2e4);
      if (((byte)pCVar5[0x14d] & 8) != 0) {
        CBaseEntity::CalcAbsolutePosition(pCVar5);
      }
      goto LAB_0097781e;
    }
  }
  dVar6 = (double)*(float *)(pCVar5 + 0x2e4);
LAB_0097781e:
  puVar3 = *(undefined1 **)(pCVar5 + 0x154);
  if (puVar3 == (undefined1 *)0x0) {
    puVar3 = &DAT_00d539c2;
  }
  ZombieDebugPrint(1,"Door(prop): %s (%f %f %f)\n",puVar3,(double)*(float *)(pCVar5 + 0x2e0),dVar6,
                   dVar7);
  goto LAB_00977790;
}

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)