L L4D2node

CTeamplayRoundBasedRules::CheckRespawnWaves

0x004ccc50 · 227 bytes · __thiscall

_ZN24CTeamplayRoundBasedRules17CheckRespawnWavesEv

Decompiled

undefined (1 param)

/* CTeamplayRoundBasedRules::CheckRespawnWaves() */

void __thiscall CTeamplayRoundBasedRules::CheckRespawnWaves(CTeamplayRoundBasedRules *this)

{
  int iVar1;
  CTeamplayRoundBasedRules *__s1;
  int iVar2;
  longdouble lVar3;
  float fVar4;
  float local_20 [4];
  
  iVar2 = 2;
  __s1 = this + 0x33c;
  while( true ) {
    iVar1 = GetNumberOfTeams();
    if (iVar1 <= iVar2) break;
    if (*(float *)(this + iVar2 * 4 + 0x334) < *(float *)(gpGlobals + 0xc) ||
        *(float *)(this + iVar2 * 4 + 0x334) == *(float *)(gpGlobals + 0xc)) {
      RespawnPlayers(this,false,true,iVar2);
      fVar4 = *(float *)(gpGlobals + 0xc);
      lVar3 = (longdouble)GetRespawnWaveMaxLength(this,iVar2,true);
      fVar4 = (float)lVar3 + fVar4;
      local_20[0] = fVar4;
      iVar1 = memcmp(__s1,local_20,4);
      if (iVar1 != 0) {
        CGameRulesProxy::NotifyNetworkStateChanged();
        *(float *)(this + iVar2 * 4 + 0x334) = fVar4;
      }
    }
    iVar2 = iVar2 + 1;
    __s1 = __s1 + 4;
  }
  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)