]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
LMS: calculate rank properly if someone left
authorRudolf Polzer <divverent@alientrap.org>
Sat, 15 Jan 2011 16:55:24 +0000 (17:55 +0100)
committerRudolf Polzer <divverent@alientrap.org>
Sat, 15 Jan 2011 16:55:24 +0000 (17:55 +0100)
qcsrc/server/g_damage.qc

index d809f3534ed89076843975f0c64874a7a4603403..e1ee5706856c05e98fd49c717c20bb6dee0277eb 100644 (file)
@@ -201,6 +201,8 @@ void GiveFrags (entity attacker, entity targ, float f, float deathtype)
                        {
                                if(!lms_next_place)
                                        lms_next_place = player_count;
+                               else
+                                       lms_next_place = min(lms_next_place, player_count);
                                PlayerScore_Add(targ, SP_LMS_RANK, lms_next_place); // won't ever spawn again
                                --lms_next_place;
                        }