L L4D2node

CTeamplayRoundBasedRules::SetInWaitingForPlayers

0x004cb100 · 263 bytes · __thiscall

_ZN24CTeamplayRoundBasedRules22SetInWaitingForPlayersEb

Decompiled

undefined (2 params)

/* CTeamplayRoundBasedRules::SetInWaitingForPlayers(bool) */

void __thiscall
CTeamplayRoundBasedRules::SetInWaitingForPlayers(CTeamplayRoundBasedRules *this,bool param_1)

{
  uint uVar1;
  char cVar2;
  undefined *puVar3;
  
  cVar2 = CMultiplayRules::IsLoadingBugBaitReport();
  if ((cVar2 == '\0') && (*(int *)(gpGlobals + 0x48) != 3)) {
    if ((CTeamplayRoundBasedRules)param_1 == this[0x328]) {
      return;
    }
    cVar2 = (**(code **)(*(int *)this + 0x29c))(this);
    if ((cVar2 == '\0') || (*(float *)(this + 0x248) != -1.0)) {
      if ((CTeamplayRoundBasedRules)param_1 != this[0x328]) {
        CGameRulesProxy::NotifyNetworkStateChanged();
        this[0x328] = (CTeamplayRoundBasedRules)param_1;
      }
      if (param_1) {
        *(float *)(this + 0x248) =
             *(float *)(mp_waitingforplayers_time._28_4_ + 0x2c) + *(float *)(gpGlobals + 0xc);
        return;
      }
      *(undefined4 *)(this + 0x248) = 0xbf800000;
      uVar1 = *(uint *)(this + 0x24c);
      if ((((uVar1 != 0xffffffff) &&
           (puVar3 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar3 != (undefined *)0xfffffffc)) &&
          (*(uint *)(puVar3 + 8) == uVar1 >> 0xc)) &&
         (*(CBaseEntity **)(puVar3 + 4) != (CBaseEntity *)0x0)) {
        UTIL_Remove(*(CBaseEntity **)(puVar3 + 4));
      }
      RestoreActiveTimer(this);
      return;
    }
  }
  if (this[0x328] == (CTeamplayRoundBasedRules)0x0) {
    return;
  }
  CGameRulesProxy::NotifyNetworkStateChanged();
  this[0x328] = (CTeamplayRoundBasedRules)0x0;
  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)