From ef7fe075803e8c36a64360e2c8e5d5d3a82cbd60 Mon Sep 17 00:00:00 2001 From: terencehill Date: Wed, 31 Jan 2018 16:15:58 +0100 Subject: [PATCH] Campaign, LMS level: end game as soon as player loses; it fixes #1857 --- qcsrc/server/mutators/mutator/gamemode_lms.qc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/qcsrc/server/mutators/mutator/gamemode_lms.qc b/qcsrc/server/mutators/mutator/gamemode_lms.qc index c281424a0..94c4a998c 100644 --- a/qcsrc/server/mutators/mutator/gamemode_lms.qc +++ b/qcsrc/server/mutators/mutator/gamemode_lms.qc @@ -48,6 +48,16 @@ int WinningCondition_LMS() if (total_players > 1) { // two or more active players - continue with the game + + if (autocvar_g_campaign) + { + FOREACH_CLIENT(IS_REAL_CLIENT(it), { + float pl_lives = GameRules_scoring_add(it, LMS_LIVES, 0); + if (!pl_lives) + return WINNING_YES; // human player lost, game over + break; + }); + } } else { -- 2.39.2