]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
don't do sudden death in campaign test run
authorRudolf Polzer <divverent@xonotic.org>
Sat, 10 Mar 2012 19:46:59 +0000 (20:46 +0100)
committerRudolf Polzer <divverent@xonotic.org>
Sat, 10 Mar 2012 19:46:59 +0000 (20:46 +0100)
qcsrc/server/g_world.qc

index 6f0e631ea50fd6db8cddb2a7f9afb4f4064f3026..86f2b25bf53554ab3e811e43f8bce9a257cf4b71 100644 (file)
@@ -1628,7 +1628,7 @@ float InitiateSuddenDeath()
        // - for this timelimit_overtime needs to be >0 of course
        // - also check the winning condition calculated in the previous frame and only add normal overtime
        //   again, if at the point at which timelimit would be extended again, still no winner was found
-       if ((checkrules_overtimesadded >= 0) && (checkrules_overtimesadded < autocvar_timelimit_overtimes) && autocvar_timelimit_overtime && !(g_race && !g_race_qualifying))
+       if (!autocvar_g_campaign && (checkrules_overtimesadded >= 0) && (checkrules_overtimesadded < autocvar_timelimit_overtimes) && autocvar_timelimit_overtime && !(g_race && !g_race_qualifying))
        {
                return 1; // need to call InitiateOvertime later
        }
@@ -1636,7 +1636,10 @@ float InitiateSuddenDeath()
        {
                if(!checkrules_suddendeathend)
                {
-                       checkrules_suddendeathend = time + 60 * autocvar_timelimit_suddendeath;
+                       if(autocvar_g_campaign)
+                               checkrules_suddendeathend = time; // no suddendeath in campaign
+                       else
+                               checkrules_suddendeathend = time + 60 * autocvar_timelimit_suddendeath;
                        if(g_race && !g_race_qualifying)
                                race_StartCompleting();
                }