L L4D2node

CDirectorScavengeMode::OnFirstSurvivorLeftSafeAreaNonVirtual

0x008b2b70 · 187 bytes · __cdecl

_ZN21CDirectorScavengeMode37OnFirstSurvivorLeftSafeAreaNonVirtualEP13CTerrorPlayer

Decompiled

undefined (1 param)

/* CDirectorScavengeMode::OnFirstSurvivorLeftSafeAreaNonVirtual(CTerrorPlayer*) */

undefined4 CDirectorScavengeMode::OnFirstSurvivorLeftSafeAreaNonVirtual(CTerrorPlayer *param_1)

{
  char cVar1;
  undefined4 uVar2;
  int iVar3;
  longdouble lVar4;
  
  cVar1 = CTerrorGameRules::IsScavengeMode();
  if (cVar1 != '\0') {
    uVar2 = CDirectorSessionManager::IsWaitingForTeamReady
                      (*(CDirectorSessionManager **)(TheDirector + 0x634));
    if ((char)uVar2 != '\0') {
      return uVar2;
    }
    iVar3 = GetRoundSetupTimeRemaining((CDirectorScavengeMode *)param_1);
    if (0 < iVar3) {
      lVar4 = (longdouble)CountdownTimer::Now();
      if ((float)lVar4 != *(float *)(param_1 + 0x18)) {
        (**(code **)(*(int *)(param_1 + 0x10) + 4))(param_1 + 0x10,param_1 + 0x18);
        *(float *)(param_1 + 0x18) = (float)lVar4;
      }
      if (*(float *)(param_1 + 0x14) != 0.0) {
        (**(code **)(*(int *)(param_1 + 0x10) + 4))(param_1 + 0x10,param_1 + 0x14);
        *(undefined4 *)(param_1 + 0x14) = 0;
        return uVar2;
      }
    }
  }
  return 0;
}

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)