L L4D2node

TerrorNavArea::SetupPVS

0x00974130 · 353 bytes · __thiscall

_ZNK13TerrorNavArea8SetupPVSEv

Decompiled

undefined (1 param)

/* TerrorNavArea::SetupPVS() const */

void __thiscall TerrorNavArea::SetupPVS(TerrorNavArea *this)

{
  longdouble lVar1;
  float fVar2;
  float fVar3;
  float fVar4;
  float local_28;
  float local_18;
  float local_14;
  float local_10;
  
  m_nPVSSize = 0x2000;
  (**(code **)(*engine + 0xec))(engine,m_PVS,0x2000);
  fVar3 = *(float *)(this + 0x14);
  local_14 = *(float *)(this + 8);
  if (25.0 <= fVar3 - local_14) {
    local_18 = *(float *)(this + 4);
    local_28 = 12.5;
    fVar4 = *(float *)(this + 0x10);
    do {
      fVar2 = 12.5;
      if (25.0 <= fVar4 - local_18) {
        do {
          local_18 = local_18 + fVar2;
          local_14 = local_14 + local_28;
          local_10 = *(float *)(this + 0xc) + 53.25;
          lVar1 = (longdouble)CNavArea::GetZ((CNavArea *)this,local_18,local_14);
          local_10 = (float)lVar1 + 53.25;
          (**(code **)(*engine + 0xf0))(engine,&local_18);
          fVar4 = *(float *)(this + 0x10);
          local_18 = *(float *)(this + 4);
          local_14 = *(float *)(this + 8);
          fVar2 = fVar2 + 25.0;
        } while (fVar2 <= (fVar4 - local_18) - 12.5);
        fVar3 = *(float *)(this + 0x14);
      }
      local_28 = local_28 + 25.0;
    } while (local_28 <= (fVar3 - local_14) - 12.5);
  }
  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)