L L4D2node

CDirector::OnRestartMap

0x00873ba0 · 208 bytes · __thiscall

_ZN9CDirector12OnRestartMapEv

Decompiled

undefined (1 param)

/* CDirector::OnRestartMap() */

void __thiscall CDirector::OnRestartMap(CDirector *this)

{
  char cVar1;
  int iVar2;
  CBaseEntity *pCVar3;
  
  cVar1 = CTerrorGameRules::IsScavengeMode();
  if (cVar1 != '\0') {
    if ((this[0x4e5] == (CDirector)0x0) && (g_pGameRules != (CTerrorGameRules *)0x0)) {
      CTerrorGameRules::ClearRoundDurations(g_pGameRules);
    }
    iVar2 = CGlobalEntityList::FindEntityByClassname
                      ((CGlobalEntityList *)gEntList,(CBaseEntity *)0x0,"info_director");
    if (iVar2 != 0) {
      pCVar3 = (CBaseEntity *)
               __dynamic_cast(iVar2,&CBaseEntity::typeinfo,&CInfoDirector::typeinfo,0);
      if (pCVar3 != (CBaseEntity *)0x0) {
        CEventQueue::AddEvent
                  ((CEventQueue *)g_EventQueue,pCVar3,"RefreshInitialSpawnPositions",0.0,
                   (CBaseEntity *)0x0,(CBaseEntity *)0x0,0);
      }
    }
    return;
  }
  ClearScavengeScores(this,false);
  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)