LMS: fix all players declared winners in console
authorterencehill <piuntn@gmail.com>
Sun, 3 Jul 2022 12:34:08 +0000 (14:34 +0200)
committerterencehill <piuntn@gmail.com>
Sun, 3 Jul 2022 12:34:08 +0000 (14:34 +0200)
qcsrc/common/gamemodes/gamemode/lms/sv_lms.qc

index 0357069988e54626982e46ab2556bde2e8633be8..9a210262b68e80b8b1c8b323a81739f8f8111f94 100644 (file)
@@ -77,13 +77,13 @@ int WinningCondition_LMS()
                        // exactly one player?
 
                        ClearWinners();
                        // exactly one player?
 
                        ClearWinners();
-                       SetWinners(winning, 0); // NOTE: exactly one player is still "player", so this works out
 
                        if (LMS_NewPlayerLives())
                        {
                                if (totalplayed && game_starttime > 0 && time > game_starttime + autocvar_g_lms_forfeit_min_match_time) // give players time to join
                                {
                                        GameRules_scoring_add(first_player, LMS_RANK, 1);
 
                        if (LMS_NewPlayerLives())
                        {
                                if (totalplayed && game_starttime > 0 && time > game_starttime + autocvar_g_lms_forfeit_min_match_time) // give players time to join
                                {
                                        GameRules_scoring_add(first_player, LMS_RANK, 1);
+                                       first_player.winning = 1;
                                        return WINNING_YES;
                                }
                                // game still running (that is, nobody got removed from the game by a frag yet)? then continue
                                        return WINNING_YES;
                                }
                                // game still running (that is, nobody got removed from the game by a frag yet)? then continue
@@ -94,6 +94,7 @@ int WinningCondition_LMS()
                                // a winner!
                                // and assign him his first place
                                GameRules_scoring_add(first_player, LMS_RANK, 1);
                                // a winner!
                                // and assign him his first place
                                GameRules_scoring_add(first_player, LMS_RANK, 1);
+                               first_player.winning = 1;
                                return WINNING_YES;
                        }
                }
                                return WINNING_YES;
                        }
                }