L L4D2node

CTeamplayRoundBasedRules::GetNextRespawnWave

0x004ccb90 · 176 bytes · __thiscall

_ZN24CTeamplayRoundBasedRules18GetNextRespawnWaveEiP11CBasePlayer

Decompiled

undefined (3 params)

/* CTeamplayRoundBasedRules::GetNextRespawnWave(int, CBasePlayer*) */

longdouble __thiscall
CTeamplayRoundBasedRules::GetNextRespawnWave
          (CTeamplayRoundBasedRules *this,int param_1,CBasePlayer *param_2)

{
  longdouble lVar1;
  longdouble lVar2;
  float fVar3;
  
  fVar3 = 0.0;
  if (*(int *)(this + 0x318) != 7) {
    if (param_2 == (CBasePlayer *)0x0) {
      return (longdouble)*(float *)(this + param_1 * 4 + 0x334);
    }
    lVar1 = (longdouble)GetMinTimeWhenPlayerMaySpawn(this,param_2);
    fVar3 = *(float *)(this + param_1 * 4 + 0x334);
    lVar2 = (longdouble)GetRespawnWaveMaxLength(this,param_1,true);
    if (0.0 < (float)lVar2) {
      for (; fVar3 < (float)lVar1; fVar3 = fVar3 + (float)lVar2) {
      }
    }
  }
  return (longdouble)fVar3;
}

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)