L L4D2node

CDirectorSessionManager::KickIdleSpectators

0x008bdaf0 · 233 bytes · __cdecl

_ZN23CDirectorSessionManager18KickIdleSpectatorsEv

Decompiled

undefined (0 params)

/* CDirectorSessionManager::KickIdleSpectators() */

void CDirectorSessionManager::KickIdleSpectators(void)

{
  char cVar1;
  int *piVar2;
  KeyValues *this;
  char *pcVar3;
  char *pcVar4;
  int iVar5;
  IsAllIdleSpectatingPlayer local_e;
  KickAllPlayers local_d;
  
  cVar1 = CDirector::IsAllBotGame();
  if ((cVar1 == '\0') && (CDirector::m_isTransitioning == '\0')) {
    local_e = (IsAllIdleSpectatingPlayer)0x1;
    ForEachTerrorPlayer<IsAllIdleSpectatingPlayer>(&local_e);
    if (local_e != (IsAllIdleSpectatingPlayer)0x0) {
      cVar1 = (**(code **)(*engine + 8))(engine);
      if (cVar1 == '\0') {
        if (g_pMatchFramework == (int *)0x0) {
          return;
        }
        piVar2 = (int *)(**(code **)(*g_pMatchFramework + 0x24))(g_pMatchFramework);
        if (piVar2 == (int *)0x0) {
          return;
        }
        this = (KeyValues *)(**(code **)(*piVar2 + 4))(piVar2);
        pcVar3 = (char *)KeyValues::GetString(this,"System/network","");
        pcVar4 = (char *)KeyValues::GetString(this,"System/access","");
        iVar5 = _V_stricmp(pcVar3,"LIVE");
        if (iVar5 != 0) {
          return;
        }
        iVar5 = _V_stricmp(pcVar4,"public");
        if (iVar5 != 0) {
          return;
        }
      }
      ForEachTerrorPlayer<KickAllPlayers>(&local_d);
    }
  }
  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)