Skip to content

Commit

Permalink
Auto-spectate now uses limbo timer to not switch spectate player too …
Browse files Browse the repository at this point in the history
…quickly
  • Loading branch information
Ymihere03 committed May 30, 2024
1 parent a5dfe3f commit 68c56ef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/game/CAbstractPlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1629,9 +1629,9 @@ void CAbstractPlayer::PlayerAction() {

// Auto spectate another player if:
// - The player runs out of lives
// - The player being spectated runs out of lives
// - The player being spectated runs out of lives (check that players limbo timer to prevent fast transition)
if ((itsGame->GetSpectatePlayer() == NULL && itsManager->IsLocalPlayer()) ||
(itsGame->GetSpectatePlayer() != NULL && itsGame->GetSpectatePlayer()->lives == 0)) {
(itsGame->GetSpectatePlayer() != NULL && itsGame->GetSpectatePlayer()->lives == 0 && itsGame->GetSpectatePlayer()->limboCount <= 0)) {
itsGame->SpectateNext();
}
}
Expand Down

0 comments on commit 68c56ef

Please sign in to comment.