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

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Sat Apr 4 17:57:13 EDT 2009


Author: mand1nga
Date: 2009-04-04 17:57:13 -0400 (Sat, 04 Apr 2009)
New Revision: 6427

Modified:
   trunk/data/qcsrc/server/havocbot.qc
Log:
Don't default to laser when there is no enemy at sight
If no weapon was chosen previously use the first available


Modified: trunk/data/qcsrc/server/havocbot.qc
===================================================================
--- trunk/data/qcsrc/server/havocbot.qc	2009-04-04 21:37:41 UTC (rev 6426)
+++ trunk/data/qcsrc/server/havocbot.qc	2009-04-04 21:57:13 UTC (rev 6427)
@@ -744,14 +744,8 @@
 	// TODO: clean this up by moving it to weapon code
 	if(self.enemy.classname!="player")
 	{
-		// If there aren't enemies at sight use the laser (like most players)
-		if(client_hasweapon(self, WEP_LASER, TRUE, FALSE))
-		{
-			self.switchweapon = WEP_LASER;
-			return;
-		}
-
-		// Otherwise get the first available weapon
+		// If no weapon was chosen get the first available weapon
+		if(self.weapon==0)
 		for(i=WEP_LASER + 1; i < WEP_COUNT ; ++i)
 		{
 			if(client_hasweapon(self, i, TRUE, FALSE))



More information about the nexuiz-commits mailing list