L L4D2node

CDirectorScavengeMode::RestartScavengeRound

0x008b2a80 · 217 bytes · __thiscall

_ZN21CDirectorScavengeMode20RestartScavengeRoundEv

Decompiled

undefined (1 param)

/* CDirectorScavengeMode::RestartScavengeRound() */

void __thiscall CDirectorScavengeMode::RestartScavengeRound(CDirectorScavengeMode *this)

{
  CDirector *pCVar1;
  CDirector *pCVar2;
  longdouble lVar3;
  
  pCVar2 = TheDirector;
  if (*this != (CDirectorScavengeMode)0x0) {
    CDirector::FinishScenarioExit(TheDirector);
    return;
  }
  if (*(int *)(TheDirector + 0x284) != 0xd) {
    CDirector::EndScenario(TheDirector,0);
    return;
  }
  pCVar1 = TheDirector + 0x268;
  lVar3 = (longdouble)CountdownTimer::Now();
  if ((float)lVar3 + 10.0 != *(float *)(pCVar2 + 0x270)) {
    (**(code **)(*(int *)(pCVar2 + 0x268) + 4))(pCVar1,pCVar2 + 0x270);
    *(float *)(pCVar2 + 0x270) = (float)lVar3 + 10.0;
  }
  if (*(float *)(pCVar2 + 0x26c) != 10.0) {
    (**(code **)(*(int *)(pCVar2 + 0x268) + 4))(pCVar1,pCVar2 + 0x26c);
    *(undefined4 *)(pCVar2 + 0x26c) = 0x41200000;
  }
  *this = (CDirectorScavengeMode)0x1;
  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)