L L4D2node

CHostState::State_GameShutdown

0x00183490 · 132 bytes · __thiscall

_ZN10CHostState18State_GameShutdownEv

Decompiled

undefined (1 param)

/* CHostState::State_GameShutdown() */

void __thiscall CHostState::State_GameShutdown(CHostState *this)

{
  uint uVar1;
  CSteam3Server *this_00;
  int *piVar2;
  CMapReslistGenerator *this_01;
  
  piVar2 = (int *)0x0;
  if (serverGameDLL != (int *)0x0) {
    this_00 = (CSteam3Server *)Steam3Server();
    CSteam3Server::NotifyOfLevelChange(this_00);
    (**(code **)(*(int *)g_pServerPluginHandler + 0x18))(g_pServerPluginHandler);
    piVar2 = serverGameDLL;
  }
  (**(code **)(*piVar2 + 0x1c))(piVar2);
  this[0x324] = (CHostState)0x0;
  Host_ShutdownServer();
  this_01 = (CMapReslistGenerator *)MapReslistGenerator();
  CMapReslistGenerator::OnLevelShutdown(this_01);
  uVar1 = *(uint *)(this + 4);
  if ((uVar1 < 8) && ((1 << ((byte)uVar1 & 0x1f) & 0xc3U) != 0)) {
    *(uint *)this = uVar1;
    return;
  }
  *(undefined4 *)this = 4;
  *(undefined4 *)(this + 4) = 4;
  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)