[nexuiz-commits] r7449 - trunk/data/qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Sun Aug 16 12:35:43 EDT 2009


Author: div0
Date: 2009-08-16 12:35:42 -0400 (Sun, 16 Aug 2009)
New Revision: 7449

Modified:
   trunk/data/qcsrc/server/g_world.qc
   trunk/data/qcsrc/server/mode_onslaught.qc
Log:
ONS fixes


Modified: trunk/data/qcsrc/server/g_world.qc
===================================================================
--- trunk/data/qcsrc/server/g_world.qc	2009-08-16 16:06:42 UTC (rev 7448)
+++ trunk/data/qcsrc/server/g_world.qc	2009-08-16 16:35:42 UTC (rev 7449)
@@ -1874,6 +1874,9 @@
 		leadlimit = 0; // no leadlimit for now
 	}
 
+	if(g_onslaught)
+		timelimit = 0; // ONS has its own overtime rule
+
 	if(timelimit > 0)
 	{
 		timelimit += game_starttime;

Modified: trunk/data/qcsrc/server/mode_onslaught.qc
===================================================================
--- trunk/data/qcsrc/server/mode_onslaught.qc	2009-08-16 16:06:42 UTC (rev 7448)
+++ trunk/data/qcsrc/server/mode_onslaught.qc	2009-08-16 16:35:42 UTC (rev 7449)
@@ -402,23 +402,26 @@
 	local float d;
 	local entity e;
 	self.nextthink = ceil(time + 1);
-	if (cvar("timelimit") && !gameover)
-	if (time > cvar("timelimit") * 60 - 60)
+	if (!gameover)
 	{
-		// self.max_health / 300 gives 5 minutes of overtime.
-		// control points reduce the overtime duration.
-		sound(self, CHAN_TRIGGER, "onslaught/generator_decay.wav", VOL_BASE, ATTN_NORM);
-		d = 1;
-		e = findchain(classname, "onslaught_controlpoint");
-		while (e)
+		if (cvar("timelimit"))
+		if (time > game_starttime + cvar("timelimit") * 60)
 		{
-			if (e.team != self.team)
-				if (e.islinked)
-					d = d + 1;
-			e = e.chain;
+			// self.max_health / 300 gives 5 minutes of overtime.
+			// control points reduce the overtime duration.
+			sound(self, CHAN_TRIGGER, "onslaught/generator_decay.wav", VOL_BASE, ATTN_NORM);
+			d = 1;
+			e = findchain(classname, "onslaught_controlpoint");
+			while (e)
+			{
+				if (e.team != self.team)
+					if (e.islinked)
+						d = d + 1;
+				e = e.chain;
+			}
+			d = d * self.max_health / 300;
+			Damage(self, self, self, d, DEATH_HURTTRIGGER, self.origin, '0 0 0');
 		}
-		d = d * self.max_health / 300;
-		Damage(self, self, self, d, DEATH_HURTTRIGGER, self.origin, '0 0 0');
 	}
 };
 
@@ -622,6 +625,8 @@
 	local float i;
 	if (damage <= 0)
 		return;
+	if(inWarmupStage)
+		return;
 	if (attacker != self)
 	{
 		if (self.isshielded)



More information about the nexuiz-commits mailing list