fix winner when player go as spectator
This commit is contained in:
parent
4a479a6d72
commit
af01e18437
@ -538,11 +538,14 @@ 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)) {
|
||||||
|
declare CSmPlayer Player = GetPlayer(Score.User.Login);
|
||||||
|
if (Player != Null && !Player.RequestsSpectate) {
|
||||||
WinnerScore <=> Score;
|
WinnerScore <=> Score;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
Scores::SetPlayerWinner(WinnerScore);
|
Scores::SetPlayerWinner(WinnerScore);
|
||||||
|
|
||||||
declare Text Message = _("|Match|Draw");
|
declare Text Message = _("|Match|Draw");
|
||||||
|
Loading…
Reference in New Issue
Block a user