]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
onslaught fixes: fix timelimit -1, and make campaign test run have a fast expiring...
authorRudolf Polzer <divverent@xonotic.org>
Sat, 10 Mar 2012 19:47:17 +0000 (20:47 +0100)
committerRudolf Polzer <divverent@xonotic.org>
Sat, 10 Mar 2012 19:47:17 +0000 (20:47 +0100)
qcsrc/server/g_world.qc
qcsrc/server/mode_onslaught.qc

index 86f2b25bf53554ab3e811e43f8bce9a257cf4b71..f8697ddcf8ffaa7903cae1227faec7a6c570ac53 100644 (file)
@@ -2140,9 +2140,6 @@ void CheckRules_World()
                leadlimit = 0; // no leadlimit for now
        }
 
-       if(g_onslaught)
-               timelimit = 0; // ONS has its own overtime rule
-
        if(timelimit > 0)
        {
                timelimit += game_starttime;
@@ -2154,6 +2151,9 @@ void CheckRules_World()
                return;
        }
 
+       if(g_onslaught)
+               timelimit = 0; // ONS has its own overtime rule
+
        float wantovertime;
        wantovertime = 0;
 
index f6e3de4cddf854cf024b8a9f4ad6f3d51caac1b3..2e0443c8c101c4280a7622aa7bc5d82218808ebe 100644 (file)
@@ -400,7 +400,10 @@ void onslaught_generator_think()
                                                d = d + 1;
                                e = e.chain;
                        }
-                       d = d * self.max_health / 300;
+                       if(autocvar_g_campaign && autocvar__campaign_testrun)
+                               d = d * self.max_health;
+                       else
+                               d = d * self.max_health / max(30, 60 * autocvar_timelimit_suddendeath);
                        Damage(self, self, self, d, DEATH_HURTTRIGGER, self.origin, '0 0 0');
                }
                else if (overtime_msg_time)