Skip to content

Commit

Permalink
endconditions.js: Fix issue leading to possible desync at game end
Browse files Browse the repository at this point in the history
Always call gameOverMessage(false) if selectedPlayer is a spectator so that ingame.endTime gets properly set on all clients. (See: 2178c59)
  • Loading branch information
past-due committed Oct 11, 2023
1 parent 46b51e1 commit 9241f59
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion data/mp/multiplay/script/rules/endconditions.js
Expand Up @@ -249,7 +249,7 @@ function checkEndConditions()
// (can be spectator-only slots who have not yet received a message,
// or previous losers who were converted to spectators who should now receive
// a new message that the game has fully ended)
if (isSpectator(-1) && !newlyLosingTeams.some((team) => (team.containsPlayer(selectedPlayer))))
if (isSpectator(-1))
{
gameOverMessage(false);
}
Expand Down

0 comments on commit 9241f59

Please sign in to comment.