From: terencehill Date: Wed, 31 Jan 2018 15:15:58 +0000 (+0100) Subject: Campaign, LMS level: end game as soon as player loses; it fixes #1857 X-Git-Tag: xonotic-v0.8.5~2363 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=ef7fe075803e8c36a64360e2c8e5d5d3a82cbd60;p=xonotic%2Fxonotic-data.pk3dir.git Campaign, LMS level: end game as soon as player loses; it fixes #1857 --- 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 {