]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
campaigntimer: allow win by timelimit if no fraglimit is set
authorRudolf Polzer <divverent@alientrap.org>
Sat, 20 Nov 2010 06:40:54 +0000 (07:40 +0100)
committerRudolf Polzer <divverent@alientrap.org>
Sat, 20 Nov 2010 06:41:28 +0000 (07:41 +0100)
qcsrc/server/campaign.qc

index 300d01a7a56607b031a28e5e0d419c2dbadd42ea..1a8db10af5238ff5c7fe15acdd50f765b306bafb 100644 (file)
@@ -188,7 +188,7 @@ void CampaignPreIntermission()
 
        if(won == 1 && lost == 0 && checkrules_equality == 0 && cheatcount_total == 0)
        {
-               if(cvar("timelimit") != 0  &&  time > cvar("timelimit") * 60) // checks if the timelimit has expired.
+               if(cvar("timelimit") != 0 && cvar("fraglimit") != 0 && time > cvar("timelimit") * 60) // checks if the timelimit has expired.
                {
                        campaign_won = 0;
                        bprint("Time's up! The current level has been LOST.\n");
@@ -196,12 +196,12 @@ void CampaignPreIntermission()
                }
                else
                {
-               campaign_won = 1;
-               bprint("The current level has been WON.\n");
-               // sound!       
+                       campaign_won = 1;
+                       bprint("The current level has been WON.\n");
+                       // sound!
                }
        }
-       else if(cvar("timelimit") != 0  &&  time > cvar("timelimit") * 60)
+       else if(cvar("timelimit") != 0 && time > cvar("timelimit") * 60)
        {
                campaign_won = 0;
                bprint("Time's up! The current level has been LOST.\n");