L L4D2node

CDirector::OnForcedRestart

0x00873760 · 187 bytes · __thiscall

_ZN9CDirector15OnForcedRestartEv

Decompiled

undefined (1 param)

/* CDirector::OnForcedRestart() */

void __thiscall CDirector::OnForcedRestart(CDirector *this)

{
  longdouble lVar1;
  
  lVar1 = (longdouble)IntervalTimer::Now();
  if ((float)lVar1 != *(float *)(this + 0x3ac)) {
    (**(code **)(*(int *)(this + 0x3a8) + 4))(this + 0x3a8,this + 0x3ac);
    *(float *)(this + 0x3ac) = (float)lVar1;
  }
  *(undefined4 *)(this + 0x3b0) = 0;
  if (*(float *)(this + 0x270) != -1.0) {
    (**(code **)(*(int *)(this + 0x268) + 4))(this + 0x268,this + 0x270);
    *(undefined4 *)(this + 0x270) = 0xbf800000;
  }
  ClearTeamScores(this,true);
  this[0x4e5] = (CDirector)0x0;
  this[0x4e6] = (CDirector)0x0;
  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)