r2340 - trunk/data/qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Wed Apr 18 13:29:52 EDT 2007


Author: div0
Date: 2007-04-18 13:29:52 -0400 (Wed, 18 Apr 2007)
New Revision: 2340

Modified:
   trunk/data/qcsrc/server/havocbot.qc
   trunk/data/qcsrc/server/t_jumppads.qc
Log:
Dear havocbots,

don't try to move in air on a jumppad ride. You can't control it, so don't.


Modified: trunk/data/qcsrc/server/havocbot.qc
===================================================================
--- trunk/data/qcsrc/server/havocbot.qc	2007-04-18 15:17:53 UTC (rev 2339)
+++ trunk/data/qcsrc/server/havocbot.qc	2007-04-18 17:29:52 UTC (rev 2340)
@@ -71,6 +71,15 @@
 	//if (self.goalentity)
 	//	te_lightning2(self, self.origin, (self.goalentity.absmin + self.goalentity.absmax) * 0.5);
 	self.movement = '0 0 0';
+
+	if(self.jumppadcount)
+	{
+		if(self.flags & FL_ONGROUND)
+			self.jumppadcount = FALSE;
+		else
+			return;
+	}
+
 	if (self.goalcurrent == world)
 		return;
 	navigation_poptouchedgoals();
@@ -195,6 +204,7 @@
 	self.movement_x = dir * v_forward;
 	self.movement_y = dir * v_right;
 	if (self.flags & FL_INWATER) self.movement_z = dir * v_up; else self.movement_z = 0;
+
 	if ((dir * v_up) >= cvar("g_balance_jumpheight")*0.5 && (self.flags & FL_ONGROUND)) self.button2=1;
 	if (((dodge * v_up) > 0) && random()*frametime >= 0.2*bound(0,(10-skill)*0.1,1)) self.button2=TRUE;
 	if (((dodge * v_up) < 0) && random()*frametime >= 0.5*bound(0,(10-skill)*0.1,1)) self.havocbot_ducktime=time+0.3/bound(0.1,skill,10);

Modified: trunk/data/qcsrc/server/t_jumppads.qc
===================================================================
--- trunk/data/qcsrc/server/t_jumppads.qc	2007-04-18 15:17:53 UTC (rev 2339)
+++ trunk/data/qcsrc/server/t_jumppads.qc	2007-04-18 17:29:52 UTC (rev 2340)
@@ -126,24 +126,27 @@
 	}
 
 	if (other.classname == "player")
-	{
-		local float i;
-		local float found;
-		if(self.pushltime < time)  // prevent "snorring" sound when a player hits the jumppad more than once
+		if(clienttype(other) == CLIENTTYPE_REAL)
 		{
-			sound (other, CHAN_ITEM, "misc/jumppad.ogg", 1, ATTN_NORM);
-			self.pushltime = time + 0.5;
+			local float i;
+			local float found;
+			if(self.pushltime < time)  // prevent "snorring" sound when a player hits the jumppad more than once
+			{
+				sound (other, CHAN_ITEM, "misc/jumppad.ogg", 1, ATTN_NORM);
+				self.pushltime = time + 0.5;
+			}
+			found = FALSE;
+			for(i = 0; i < other.jumppadcount && i < NUM_JUMPPADSUSED; ++i)
+				if(other.(jumppadsused[i]) == self)
+					found = TRUE;
+			if(!found)
+			{
+				other.(jumppadsused[math_mod(other.jumppadcount, NUM_JUMPPADSUSED)]) = self;
+				other.jumppadcount = other.jumppadcount + 1;
+			}
 		}
-		found = FALSE;
-		for(i = 0; i < other.jumppadcount && i < NUM_JUMPPADSUSED; ++i)
-			if(other.(jumppadsused[i]) == self)
-				found = TRUE;
-		if(!found)
-		{
-			other.(jumppadsused[math_mod(other.jumppadcount, NUM_JUMPPADSUSED)]) = self;
-			other.jumppadcount = other.jumppadcount + 1;
-		}
-	}
+		else
+			other.jumppadcount = TRUE;
 
 	self.movedir = trigger_push_calculatevelocity(other.origin, self.enemy, self.height);
 




More information about the nexuiz-commits mailing list