L L4D2node

CDirectorSurvivalMode::RestartSurvivalRound

0x008bed60 · 237 bytes · __thiscall

_ZN21CDirectorSurvivalMode20RestartSurvivalRoundEv

Decompiled

undefined (1 param)

/* CDirectorSurvivalMode::RestartSurvivalRound() */

void __thiscall CDirectorSurvivalMode::RestartSurvivalRound(CDirectorSurvivalMode *this)

{
  CDirector *pCVar1;
  CDirector *pCVar2;
  longdouble lVar3;
  
  pCVar2 = TheDirector;
  if (this[1] != (CDirectorSurvivalMode)0x0) {
    CDirector::FinishScenarioExit(TheDirector);
    return;
  }
  if (*(int *)(TheDirector + 0x284) == 0xf) {
    pCVar1 = TheDirector + 0x268;
    lVar3 = (longdouble)CountdownTimer::Now();
    if ((float)lVar3 + 5.0 != *(float *)(pCVar2 + 0x270)) {
      (**(code **)(*(int *)(pCVar2 + 0x268) + 4))(pCVar1,pCVar2 + 0x270);
      *(float *)(pCVar2 + 0x270) = (float)lVar3 + 5.0;
    }
    if (*(float *)(pCVar2 + 0x26c) != 5.0) {
      (**(code **)(*(int *)(pCVar2 + 0x268) + 4))(pCVar1,pCVar2 + 0x26c);
      *(undefined4 *)(pCVar2 + 0x26c) = 0x40a00000;
    }
    this[1] = (CDirectorSurvivalMode)0x1;
  }
  else {
    if (*(int *)(TheDirector + 0x284) == 0x10) {
      CDirector::StartRematchVote(TheDirector);
      return;
    }
    CDirector::EndScenario(TheDirector,0);
  }
  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)