Skip to content

Commit

Permalink
CInfClassGameController: Deny respawns if the world reset requested
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaffeine committed Nov 24, 2021
1 parent 68a5b36 commit b2bdde6
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/game/server/infclass/infcgamecontroller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1847,7 +1847,15 @@ bool CInfClassGameController::TryRespawn(CInfClassPlayer *pPlayer, SpawnContext
// spectators can't spawn
if(pPlayer->GetTeam() == TEAM_SPECTATORS)
return false;


// Deny any spawns during the World ResetRequested because the new Characters
// are going to be destroyed during this IGameServer::Tick().
// (and it may break the auto class selection)
if(GameServer()->m_World.m_ResetRequested)
{
return false;
}

if(m_InfectedStarted)
pPlayer->StartInfection();

Expand Down

0 comments on commit b2bdde6

Please sign in to comment.