L L4D2node

CTeamplayRoundBasedRules::CheckReadyRestart

0x004caae0 · 233 bytes · __thiscall

_ZN24CTeamplayRoundBasedRules17CheckReadyRestartEv

Decompiled

undefined (1 param)

/* CTeamplayRoundBasedRules::CheckReadyRestart() */

void __thiscall CTeamplayRoundBasedRules::CheckReadyRestart(CTeamplayRoundBasedRules *this)

{
  char cVar1;
  int iVar2;
  int iVar3;
  
  if (((0.0 < *(float *)(this + 0x32c)) && (*(float *)(this + 0x32c) < *(float *)(gpGlobals + 0xc)))
     && (cVar1 = (**(code **)(*(int *)g_pServerBenchmark + 8))(g_pServerBenchmark), cVar1 == '\0'))
  {
    State_Leave(this);
    State_Enter(this,6);
    if (*(float *)(this + 0x32c) != -1.0) {
      CGameRulesProxy::NotifyNetworkStateChanged();
      *(undefined4 *)(this + 0x32c) = 0xbf800000;
    }
  }
  iVar3 = 2;
  if (this[0x329] != (CTeamplayRoundBasedRules)0x0) {
    for (; iVar2 = GetNumberOfTeams(), iVar3 < iVar2; iVar3 = iVar3 + 1) {
      if (this[iVar3 + 0x3b4] == (CTeamplayRoundBasedRules)0x0) {
        return;
      }
    }
    ConVar::SetValue(0xf7df20);
    if (this[0x329] != (CTeamplayRoundBasedRules)0x0) {
      CGameRulesProxy::NotifyNetworkStateChanged();
      this[0x329] = (CTeamplayRoundBasedRules)0x0;
    }
    this[0x255] = (CTeamplayRoundBasedRules)0x1;
    this[0x256] = (CTeamplayRoundBasedRules)0x1;
    this[599] = (CTeamplayRoundBasedRules)0x1;
  }
  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)