L L4D2node

ZombieManager::OnNavAreaVacated

0x00a59250 · 160 bytes · __thiscall

_ZN13ZombieManager16OnNavAreaVacatedEP13TerrorNavArea

Decompiled

undefined (2 params)

/* ZombieManager::OnNavAreaVacated(TerrorNavArea*) */

void __thiscall ZombieManager::OnNavAreaVacated(ZombieManager *this,TerrorNavArea *param_1)

{
  char cVar1;
  int iVar2;
  int iVar3;
  
  if (**(char **)(TheDirector + 0x648) == '\0') {
    if (*(char *)(*(int *)(TheDirector + 0x644) + 8) == '\0') {
      return;
    }
    iVar3 = *(int *)(scavenge_wanderer_respawn_chance._28_4_ + 0x30);
  }
  else {
    iVar3 = CDirector::GetScriptValue
                      (TheDirector,"ClearedWandererRespawnChance",
                       *(int *)(DirectorPrivate_DirectorClearedWandererRespawnChance._28_4_ + 0x30))
    ;
  }
  if ((((0 < iVar3) && (*(int *)(param_1 + 0x128) == 0)) &&
      (cVar1 = TerrorNavArea::IsValidForWanderingPopulation(param_1), cVar1 != '\0')) &&
     (iVar2 = RandomInt(0,100), iVar2 <= iVar3)) {
    iVar3 = 0;
    if (-1 < *(int *)(param_1 + 0x128) + 1) {
      iVar3 = *(int *)(param_1 + 0x128) + 1;
    }
    *(int *)(param_1 + 0x128) = iVar3;
  }
  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)