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
1 changed files with 5 additions and 2 deletions

View File

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