fix winner when player go as spectator

This commit is contained in:
Beu 2022-03-08 21:52:19 +01:00
parent 4a479a6d72
commit af01e18437

View File

@ -538,8 +538,11 @@ if (Round_ForceEndRound || Round_SkipPauseRound) {
if (WinnerScore == Null) { if (WinnerScore == Null) {
foreach (Score in Scores) { foreach (Score in Scores) {
if (Score.BestRaceTimes.count <= 0 && Score.User != Null && AccountIdsOfPlayers.exists(Score.User.WebServicesUserId)) { if (Score.BestRaceTimes.count <= 0 && Score.User != Null && AccountIdsOfPlayers.exists(Score.User.WebServicesUserId)) {
WinnerScore <=> Score; declare CSmPlayer Player = GetPlayer(Score.User.Login);
break; if (Player != Null && !Player.RequestsSpectate) {
WinnerScore <=> Score;
break;
}
} }
} }
} }