L L4D2node

CDirectorVersusMode::ExitScenarioNonVirtual

0x008c4970 · 121 bytes · __thiscall

_ZN19CDirectorVersusMode22ExitScenarioNonVirtualEv

Decompiled

undefined (1 param)

/* CDirectorVersusMode::ExitScenarioNonVirtual() */

bool __thiscall CDirectorVersusMode::ExitScenarioNonVirtual(CDirectorVersusMode *this)

{
  int iVar1;
  char cVar2;
  
  iVar1 = TheDirector;
  if (*(float *)(TheDirector + 0x270) != -1.0) {
    (**(code **)(*(int *)(TheDirector + 0x268) + 4))(TheDirector + 0x268,TheDirector + 0x270);
    *(undefined4 *)(iVar1 + 0x270) = 0xbf800000;
  }
  cVar2 = CTerrorGameRules::IsVersusMode();
  if (cVar2 != '\0') {
    EndVersusModeRound(this,true);
  }
  return cVar2 == '\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)