From af01e184378762a3fa18d4668b20b58b54258375 Mon Sep 17 00:00:00 2001 From: Beu Date: Tue, 8 Mar 2022 21:52:19 +0100 Subject: [PATCH] fix winner when player go as spectator --- LastManStanding.Script.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/LastManStanding.Script.txt b/LastManStanding.Script.txt index 0d6eee5..024b941 100644 --- a/LastManStanding.Script.txt +++ b/LastManStanding.Script.txt @@ -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; + } } } }