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

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Sat Apr 4 16:27:51 EDT 2009


Author: div0
Date: 2009-04-04 16:27:50 -0400 (Sat, 04 Apr 2009)
New Revision: 6425

Modified:
   trunk/data/qcsrc/server/havocbot.qc
   trunk/data/qcsrc/server/t_items.qc
Log:
- trigger_items: make it kill dropped weapons
- bots: fix warning


Modified: trunk/data/qcsrc/server/havocbot.qc
===================================================================
--- trunk/data/qcsrc/server/havocbot.qc	2009-04-04 20:08:48 UTC (rev 6424)
+++ trunk/data/qcsrc/server/havocbot.qc	2009-04-04 20:27:50 UTC (rev 6425)
@@ -380,9 +380,9 @@
 			// If there is no goal try to move forward
 			if(self.goalcurrent==world)
 			{
-				local float speed = fabs(self.velocity_x) + fabs(self.velocity_y);
+				local float xyspeed = fabs(self.velocity_x) + fabs(self.velocity_y);
 
-				if(speed > (maxspeed / 1.5) && speed > (maxspeed / 4))
+				if(xyspeed > (maxspeed / 1.5) && xyspeed > (maxspeed / 4))
 				{
 					self.movement_x = 0;
 				}
@@ -393,7 +393,7 @@
 
 					if(trace_fraction==1)
 					{
-						if(speed < (maxspeed / 2))
+						if(xyspeed < (maxspeed / 2))
 							self.movement_x = maxspeed;
 					}
 				}

Modified: trunk/data/qcsrc/server/t_items.qc
===================================================================
--- trunk/data/qcsrc/server/t_items.qc	2009-04-04 20:08:48 UTC (rev 6424)
+++ trunk/data/qcsrc/server/t_items.qc	2009-04-04 20:27:50 UTC (rev 6425)
@@ -1150,6 +1150,14 @@
 void target_items_use (void)
 {
 	float h0, a0;
+
+	if(activator.classname == "droppedweapon")
+	{
+		EXACTTRIGGER_TOUCH;
+		remove(activator);
+		return;
+	}
+
 	if(activator.classname != "player")
 		return;
 	if(activator.deadflag != DEAD_NO)



More information about the nexuiz-commits mailing list