]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
LMS: fix screwed up rankings when a spectator disconnects
authorterencehill <piuntn@gmail.com>
Sat, 1 Jan 2022 22:23:41 +0000 (23:23 +0100)
committerterencehill <piuntn@gmail.com>
Sat, 1 Jan 2022 22:23:41 +0000 (23:23 +0100)
qcsrc/common/gamemodes/gamemode/lms/sv_lms.qc

index 8f545955caefc20137883d1d15f9c066ec610eb5..37551c7f88981050c5bdc9a8f889253956ba05c1 100644 (file)
@@ -265,10 +265,10 @@ void lms_RemovePlayer(entity player)
                        });
                        GameRules_scoring_add(player, LMS_RANK, pl_cnt + 1);
                }
-               else
+               else if (player.lmsplayer)
                {
                        int min_forfeiter_rank = 665; // different from 666
-                       FOREACH_CLIENT(true, {
+                       FOREACH_CLIENT(it != player, {
                                // update rank of other players that were eliminated
                                if (it.frags == FRAGS_PLAYER_OUT_OF_GAME)
                                {