r4850 - trunk/data/qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Fri Oct 24 02:21:24 EDT 2008


Author: div0
Date: 2008-10-24 02:21:24 -0400 (Fri, 24 Oct 2008)
New Revision: 4850

Modified:
   trunk/data/qcsrc/server/cl_weaponsystem.qc
Log:
fix IT_UNLIMITED_AMMO


Modified: trunk/data/qcsrc/server/cl_weaponsystem.qc
===================================================================
--- trunk/data/qcsrc/server/cl_weaponsystem.qc	2008-10-24 06:18:18 UTC (rev 4849)
+++ trunk/data/qcsrc/server/cl_weaponsystem.qc	2008-10-24 06:21:24 UTC (rev 4850)
@@ -389,11 +389,18 @@
 	{
 		if (andammo)
 		{
-			oldself = self;
-			self = cl;
-			f = weapon_action(wpn, WR_CHECKAMMO1);
-			f = f + weapon_action(wpn, WR_CHECKAMMO2);
-			self = oldself;
+			if(cl.items & IT_UNLIMITED_AMMO)
+			{
+				f = 1;
+			}
+			else
+			{
+				oldself = self;
+				self = cl;
+				f = weapon_action(wpn, WR_CHECKAMMO1);
+				f = f + weapon_action(wpn, WR_CHECKAMMO2);
+				self = oldself;
+			}
 			if (!f)
 			{
 				if (complain)
@@ -459,6 +466,7 @@
 			return FALSE;
 		}
 	
+	if not(self.items & IT_UNLIMITED_AMMO)
 	if (!weapon_action(self.weapon, WR_CHECKAMMO1 + secondary))
 	{
 		W_SwitchWeapon_Force(self, w_getbestweapon(self));




More information about the nexuiz-commits mailing list