L L4D2node

CDirector::CheckForSurvivorsLeavingSafeArea

0x00884a20 · 275 bytes · __thiscall

_ZN9CDirector32CheckForSurvivorsLeavingSafeAreaEv

Decompiled

undefined (1 param)

/* CDirector::CheckForSurvivorsLeavingSafeArea() */

void __thiscall CDirector::CheckForSurvivorsLeavingSafeArea(CDirector *this)

{
  int local_3c;
  int local_38;
  undefined4 local_34;
  undefined4 local_30;
  undefined4 local_2c;
  undefined4 local_28;
  undefined4 local_24;
  undefined4 *local_20;
  undefined4 local_1c;
  undefined4 local_18;
  undefined4 local_14;
  undefined4 *local_10;
  
  if ((this[0x160] == (CDirector)0x0) || (this[0x161] == (CDirector)0x0)) {
    local_34 = 0;
    local_30 = 0;
    local_2c = 0;
    local_28 = 0;
    local_24 = 0;
    local_20 = (undefined4 *)0x0;
    local_1c = 0;
    local_18 = 0;
    local_14 = 0;
    local_10 = (undefined4 *)0x0;
    local_3c = 0;
    local_38 = 0;
                    /* try { // try from 00884a9a to 00884b30 has its CatchHandler @ 00884b3d */
    ForEachPlayer<SurvivorsInSafeArea>((SurvivorsInSafeArea *)&local_3c);
    if (0 < local_38) {
      if (this[0x160] == (CDirector)0x0) {
        OnFirstSurvivorLeftSafeArea(this,(CTerrorPlayer *)*local_20);
      }
      if ((local_3c == 0) && (this[0x161] == (CDirector)0x0)) {
        this[0x161] = (CDirector)0x1;
        OnLastSurvivorLeftSafeArea(this);
      }
    }
    local_14 = 0;
    CUtlMemory<CTerrorPlayer*,int>::Purge((CUtlMemory<CTerrorPlayer*,int> *)&local_20);
    local_10 = local_20;
    CUtlMemory<CTerrorPlayer*,int>::Purge((CUtlMemory<CTerrorPlayer*,int> *)&local_20);
    local_28 = 0;
    CUtlMemory<CTerrorPlayer*,int>::Purge((CUtlMemory<CTerrorPlayer*,int> *)&local_34);
    local_24 = local_34;
    CUtlMemory<CTerrorPlayer*,int>::Purge((CUtlMemory<CTerrorPlayer*,int> *)&local_34);
  }
  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)