L L4D2node

CTeamplayRoundBasedRules::Think

0x004ce4c0 · 220 bytes · __thiscall

_ZN24CTeamplayRoundBasedRules5ThinkEv

Decompiled

undefined (1 param)

/* CTeamplayRoundBasedRules::Think() */

void __thiscall CTeamplayRoundBasedRules::Think(CTeamplayRoundBasedRules *this)

{
  char cVar1;
  
  if (g_fGameOver != '\0') {
    if ((*(float *)(this + 0x20) != 0.0) && (*(float *)(this + 0x20) < *(float *)(gpGlobals + 0xc)))
    {
      (**(code **)(*(int *)this + 0x244))(this);
      *(undefined4 *)(this + 0x20) = 0;
      return;
    }
    return;
  }
  State_Think(this);
  if (*(float *)(this + 0x250) <= *(float *)(gpGlobals + 0xc) &&
      *(float *)(gpGlobals + 0xc) != *(float *)(this + 0x250)) {
    if ((*(int *)(this + 0x318) != 5) && (1 < *(int *)(this + 0x318) - 7U)) {
      cVar1 = (**(code **)(*(int *)this + 0x2e8))(this);
      if (cVar1 != '\0') {
        return;
      }
      cVar1 = CheckMaxRounds(this);
      if (cVar1 != '\0') {
        return;
      }
    }
    CheckRestartRound(this);
    CheckWaitingForPlayers(this);
    *(float *)(this + 0x250) = *(float *)(gpGlobals + 0xc) + 1.0;
  }
  CGameRules::Think((CGameRules *)this);
  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)