L L4D2node

CCSGameRules::CheckRoundTimeExpired

0x00437f20 · 353 bytes · __thiscall

_ZN12CCSGameRules21CheckRoundTimeExpiredEv

Decompiled

undefined (1 param)

/* CCSGameRules::CheckRoundTimeExpired() */

void __thiscall CCSGameRules::CheckRoundTimeExpired(CCSGameRules *this)

{
  int iVar1;
  undefined4 uVar2;
  
  if ((((*(float *)(this + 0x244) - *(float *)(gpGlobals + 0xc)) + (float)*(int *)(this + 0x240) <=
        0.0) && (*(int *)(this + 600) == 0)) && (this[0x27c] != (CCSGameRules)0x0)) {
    if (this[0x250] == (CCSGameRules)0x0) {
      if (this[0x251] == (CCSGameRules)0x0) {
        if (this[0x2b8] == (CCSGameRules)0x0) {
          if (*(int *)(this + 0x2c4) != 1) {
            return;
          }
          *(int *)(this + 0x280) = *(int *)(this + 0x280) + 0xcb2;
          *(short *)(this + 0x28a) = *(short *)(this + 0x28a) + 1;
          iVar1 = *(int *)this;
          uVar2 = 0xf;
        }
        else {
          *(short *)(this + 0x288) = *(short *)(this + 0x288) + 1;
          iVar1 = *(int *)this;
          uVar2 = 0xe;
        }
        (**(code **)(iVar1 + 0x2a4))(this,0x40a00000,uVar2);
        UpdateTeamScores(this);
        return;
      }
      *(int *)(this + 0x280) = *(int *)(this + 0x280) + 0xcb2;
      *(short *)(this + 0x28a) = *(short *)(this + 0x28a) + 1;
      (**(code **)(*(int *)this + 0x2a4))(this,0x40a00000,0xd);
      UpdateTeamScores(this);
      MarkLivingPlayersOnTeamAsNotReceivingMoneyNextRound(this,3);
    }
    else if (this[0x2d4] == (CCSGameRules)0x0) {
      *(int *)(this + 0x284) = *(int *)(this + 0x284) + 0xcb2;
      *(short *)(this + 0x288) = *(short *)(this + 0x288) + 1;
      (**(code **)(*(int *)this + 0x2a4))(this,0x40a00000,0xc);
      UpdateTeamScores(this);
      MarkLivingPlayersOnTeamAsNotReceivingMoneyNextRound(this,2);
    }
  }
  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)