diff --git a/src/game/CAbstractPlayer.cpp b/src/game/CAbstractPlayer.cpp index 30a51e5e..f03e2113 100644 --- a/src/game/CAbstractPlayer.cpp +++ b/src/game/CAbstractPlayer.cpp @@ -1553,8 +1553,12 @@ void CAbstractPlayer::PlayerAction() { Reincarnate(); } else { itsManager->DeadOrDone(); - if ((itsGame->GetSpectatePlayer() == NULL && itsManager->IsLocalPlayer()) || // Player is out of lives - (itsGame->GetSpectatePlayer() != NULL && itsGame->GetSpectatePlayer()->lives == 0)) { // Spectate player is out of lives + + // Auto spectate another player if: + // - The player runs out of lives + // - The player being spectated runs out of lives + if ((itsGame->GetSpectatePlayer() == NULL && itsManager->IsLocalPlayer()) || + (itsGame->GetSpectatePlayer() != NULL && itsGame->GetSpectatePlayer()->lives == 0)) { itsGame->SpectateNext(); } } diff --git a/src/game/CHUD.cpp b/src/game/CHUD.cpp index f89b5a60..5bf8c93b 100644 --- a/src/game/CHUD.cpp +++ b/src/game/CHUD.cpp @@ -842,7 +842,7 @@ void CHUD::DrawKillFeed(NVGcontext *ctx, CNetManager *net, int bufferWidth, floa nvgFillColor(ctx, BACKGROUND_COLOR); nvgFill(ctx); - ARGBColor longTeamColor = *ColorManager::getTeamColor(net->teamColors[event.team]); + ARGBColor longTeamColor = *ColorManager::getTeamColor(event.team); longTeamColor.ExportGLFloats(teamColorRGB, 3); nvgBeginPath(ctx); @@ -886,7 +886,7 @@ void CHUD::DrawKillFeed(NVGcontext *ctx, CNetManager *net, int bufferWidth, floa nvgFillColor(ctx, BACKGROUND_COLOR); nvgFill(ctx); - ARGBColor longTeamColor = *ColorManager::getTeamColor(net->teamColors[event.team]); + ARGBColor longTeamColor = *ColorManager::getTeamColor(event.team); longTeamColor.ExportGLFloats(teamColorRGB, 3); nvgBeginPath(ctx); diff --git a/src/game/CPlayerManager.cpp b/src/game/CPlayerManager.cpp index ea0208c9..2d67e7fa 100644 --- a/src/game/CPlayerManager.cpp +++ b/src/game/CPlayerManager.cpp @@ -1101,6 +1101,12 @@ void CPlayerManagerImpl::SetPlayerStatus(LoadingState newStatus, PresenceType ne loadingStatus = newStatus; presence = newPresence; + + // Check if the game is ready to start if a player set themselves to away or spectator + // Only the server can start the game this way to prevent multiple game start commands + if ((newPresence == kzSpectating || newPresence == kzAway) && theNetManager->itsCommManager->myId == 0) { + SetPlayerReady(true); + } } void CPlayerManagerImpl::SetPlayerReady(bool isReady) {