L L4D2node

CTerrorGameRules::OnBeginChangeLevel

0x008f6460 · 149 bytes · __thiscall

_ZN16CTerrorGameRules18OnBeginChangeLevelEPKc

Decompiled

undefined (2 params)

/* CTerrorGameRules::OnBeginChangeLevel(char const*) */

void __thiscall CTerrorGameRules::OnBeginChangeLevel(CTerrorGameRules *this,char *param_1)

{
  int *piVar1;
  NoteIdlePlayers local_13;
  ForceTakeover local_12;
  FinishBackpackItems local_11;
  char *local_10;
  
  piVar1 = mdlcache;
  (**(code **)(*mdlcache + 0x68))(mdlcache);
                    /* try { // try from 008f6476 to 008f64e5 has its CatchHandler @ 008f64f5 */
  Commentary_AbortCurrentNode();
  UTIL_LogPrintf("Preparing player entities for changelevel\n");
  PurgeTransitionRecords();
  ForEachTerrorPlayer<NoteIdlePlayers>(&local_13,true);
  ForEachTerrorPlayer<ForceTakeover>(&local_12);
  ForEachSurvivor<FinishBackpackItems>(&local_11);
  local_10 = param_1;
  ForEachTerrorPlayer<PrepareChangelevel>((PrepareChangelevel *)&local_10);
  TheNextBots();
  NextBotManager::OnBeginChangeLevel();
  (**(code **)(*TheDirector + 0x10))(TheDirector);
  (**(code **)(*piVar1 + 0x6c))(piVar1);
  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)