L L4D2node

CNavArea::ComputeEarliestOccupyTimes

0x0071c840 · 399 bytes · __thiscall

_ZN8CNavArea26ComputeEarliestOccupyTimesEv

Decompiled

undefined (1 param)

/* CNavArea::ComputeEarliestOccupyTimes() */

void __thiscall CNavArea::ComputeEarliestOccupyTimes(CNavArea *this)

{
  undefined4 uVar1;
  CBaseEntity *pCVar2;
  float fVar3;
  ShortestPathCost local_1d [13];
  
  uVar1 = nav_quicksave._28_4_;
  *(undefined4 *)(this + 0xd4) = 0x42f00000;
  *(undefined4 *)(this + 0xd8) = 0x42f00000;
  if (*(int *)(uVar1 + 0x30) == 0) {
    pCVar2 = (CBaseEntity *)
             CGlobalEntityList::FindEntityByClassname
                       ((CGlobalEntityList *)gEntList,(CBaseEntity *)0x0,"info_player_terrorist");
    for (; pCVar2 != (CBaseEntity *)0x0;
        pCVar2 = (CBaseEntity *)
                 CGlobalEntityList::FindEntityByClassname
                           ((CGlobalEntityList *)gEntList,pCVar2,"info_player_terrorist")) {
      if (((byte)pCVar2[0x14d] & 8) != 0) {
        CBaseEntity::CalcAbsolutePosition(pCVar2);
      }
      fVar3 = NavAreaTravelDistance<ShortestPathCost>
                        ((Vector *)(pCVar2 + 0x2e0),(Vector *)(this + 0x2c),local_1d);
      if ((0.0 <= fVar3) && (fVar3 * 0.004166667 < *(float *)(this + 0xd4))) {
        *(float *)(this + 0xd4) = fVar3 * 0.004166667;
      }
    }
    pCVar2 = (CBaseEntity *)
             CGlobalEntityList::FindEntityByClassname
                       ((CGlobalEntityList *)gEntList,(CBaseEntity *)0x0,
                        "info_player_counterterrorist");
    for (; pCVar2 != (CBaseEntity *)0x0;
        pCVar2 = (CBaseEntity *)
                 CGlobalEntityList::FindEntityByClassname
                           ((CGlobalEntityList *)gEntList,pCVar2,"info_player_counterterrorist")) {
      if (((byte)pCVar2[0x14d] & 8) != 0) {
        CBaseEntity::CalcAbsolutePosition(pCVar2);
      }
      fVar3 = NavAreaTravelDistance<ShortestPathCost>
                        ((Vector *)(pCVar2 + 0x2e0),(Vector *)(this + 0x2c),local_1d);
      if ((0.0 <= fVar3) && (fVar3 * 0.004166667 < *(float *)(this + 0xd8))) {
        *(float *)(this + 0xd8) = fVar3 * 0.004166667;
      }
    }
  }
  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)