L L4D2node

CTeamplayRoundBasedRules::RespawnPlayers

0x004cb8f0 · 312 bytes · __thiscall

_ZN24CTeamplayRoundBasedRules14RespawnPlayersEbbi

Decompiled

undefined (4 params)

/* CTeamplayRoundBasedRules::RespawnPlayers(bool, bool, int) */

void __thiscall
CTeamplayRoundBasedRules::RespawnPlayers
          (CTeamplayRoundBasedRules *this,bool param_1,bool param_2,int param_3)

{
  char cVar1;
  CBaseEntity *this_00;
  int iVar2;
  int iVar3;
  
  iVar3 = 1;
  if (*(int *)(gpGlobals + 0x14) < 1) {
    return;
  }
LAB_004cb920:
  this_00 = (CBaseEntity *)UTIL_PlayerByIndex(iVar3);
  if ((this_00 != (CBaseEntity *)0x0) &&
     (cVar1 = (**(code **)(*(int *)this_00 + 0x16c))(this_00), cVar1 != '\0')) {
    if ((param_2) && (iVar2 = CBaseEntity::GetTeamNumber(this_00), iVar2 != param_3)) {
      iVar3 = iVar3 + 1;
      if (*(int *)(gpGlobals + 0x14) < iVar3) {
        return;
      }
      goto LAB_004cb920;
    }
    cVar1 = (**(code **)(*(int *)this_00 + 0x750))(this_00);
    if (cVar1 != '\0') {
      if (!param_1) {
        cVar1 = (**(code **)(*(int *)this_00 + 300))(this_00);
        if (cVar1 != '\0') goto LAB_004cb9a0;
        if (*(int *)(this + 0x318) != 3) {
          if ((param_2) &&
             (cVar1 = (**(code **)(*(int *)this + 0x28c))(this,this_00), cVar1 == '\0'))
          goto LAB_004cb9a0;
          cVar1 = (**(code **)(*(int *)this_00 + 0x754))(this_00);
          if (cVar1 == '\0') goto LAB_004cb9e8;
        }
      }
      (**(code **)(*(int *)this_00 + 0x574))(this_00);
      goto LAB_004cb9a0;
    }
LAB_004cb9e8:
    cVar1 = (**(code **)(*(int *)this_00 + 0x758))(this_00);
    iVar2 = gpGlobals;
    if (cVar1 != '\0') {
      this_00[0x1ff4] = (CBaseEntity)0x1;
      iVar3 = iVar3 + 1;
      if (*(int *)(iVar2 + 0x14) < iVar3) {
        return;
      }
      goto LAB_004cb920;
    }
  }
LAB_004cb9a0:
  iVar3 = iVar3 + 1;
  if (*(int *)(gpGlobals + 0x14) < iVar3) {
    return;
  }
  goto LAB_004cb920;
}

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)