From: terencehill Date: Sun, 27 Nov 2016 23:23:07 +0000 (+0100) Subject: LMS: Restore decreasing rank (starting from 665) applied to quitters X-Git-Tag: xonotic-v0.8.2~404^2~1 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=79c96ff86940f6bc62cd588597182c8066445e44;p=xonotic%2Fxonotic-data.pk3dir.git LMS: Restore decreasing rank (starting from 665) applied to quitters --- diff --git a/qcsrc/server/mutators/mutator/gamemode_lms.qc b/qcsrc/server/mutators/mutator/gamemode_lms.qc index 348930bf5..c325a3595 100644 --- a/qcsrc/server/mutators/mutator/gamemode_lms.qc +++ b/qcsrc/server/mutators/mutator/gamemode_lms.qc @@ -168,6 +168,7 @@ MUTATOR_HOOKFUNCTION(lms, PlayerDies) void lms_RemovePlayer(entity player) { + static int quitters = 0; float player_rank = PlayerScore_Add(player, SP_LMS_RANK, 0); if (!player_rank) { @@ -185,7 +186,7 @@ void lms_RemovePlayer(entity player) if (it.frags == FRAGS_LMS_LOSER) { float it_rank = PlayerScore_Add(it, SP_LMS_RANK, 0); - if (it_rank > player_rank && it_rank < 665) + if (it_rank > player_rank && it_rank <= 256) PlayerScore_Add(it, SP_LMS_RANK, -1); lms_lowest_lives = 0; } @@ -196,9 +197,12 @@ void lms_RemovePlayer(entity player) lms_lowest_lives = tl; } }); + PlayerScore_Add(player, SP_LMS_RANK, 665 - quitters); // different from 666 if(!warmup_stage) + { PlayerScore_Add(player, SP_LMS_LIVES, -PlayerScore_Add(player, SP_LMS_LIVES, 0)); - PlayerScore_Add(player, SP_LMS_RANK, 665); // different from 666 + ++quitters; + } player.frags = FRAGS_LMS_LOSER; TRANSMUTE(Observer, player); }