]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/mutators/mutator/gamemode_lms.qc
Campaign, LMS level: end game as soon as player loses; it fixes #1857
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / mutators / mutator / gamemode_lms.qc
index c281424a076d5688ac6fac9a936ca22f9501ba27..94c4a998c2cc616b4d3f1f64487eb4b5fb98e42e 100644 (file)
@@ -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
                {