L L4D2node

TerrorNavArea::OnEnterActiveSet

0x00978870 · 160 bytes · __thiscall

_ZN13TerrorNavArea16OnEnterActiveSetE21SurvivorCharacterType

Decompiled

undefined (2 params)

/* TerrorNavArea::OnEnterActiveSet(SurvivorCharacterType) */

void __thiscall TerrorNavArea::OnEnterActiveSet(TerrorNavArea *this,byte param_2)

{
  char cVar1;
  uint uVar2;
  TerrorNavArea *local_10 [2];
  
  uVar2 = *(uint *)(this + 0x15c);
  if (uVar2 == 0) {
    if (*(int *)(this + 0x128) == 0) {
      uVar2 = *(uint *)(this + 300);
    }
    else {
      local_10[0] = this;
      CUtlVector<CNavArea*,CUtlMemory<CNavArea*,int>>::InsertBefore
                ((CUtlVector<CNavArea*,CUtlMemory<CNavArea*,int>> *)gm_wanderingPopulationRequests,
                 gm_wanderingPopulationRequests._12_4_,(CNavArea **)local_10);
      uVar2 = *(uint *)(this + 300);
    }
    if ((((uVar2 & 0x10882) == 0) && ((uVar2 & 0x4000) != 0)) &&
       (cVar1 = CDirector::OnThreatEncountered(TheDirector,this), cVar1 != '\0')) {
      *(uint *)(this + 300) = *(uint *)(this + 300) & 0xffffbfff;
    }
    uVar2 = *(uint *)(this + 0x15c);
  }
  *(uint *)(this + 0x15c) = 1 << (param_2 & 0x1f) | uVar2;
  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)