[nexuiz-commits] r8135 - trunk/data/qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Thu Oct 15 03:20:22 EDT 2009
Author: div0
Date: 2009-10-15 03:20:21 -0400 (Thu, 15 Oct 2009)
New Revision: 8135
Modified:
trunk/data/qcsrc/server/cl_weaponsystem.qc
Log:
force the out-of-ammo weapon switch even if the other mode still has ammo
Modified: trunk/data/qcsrc/server/cl_weaponsystem.qc
===================================================================
--- trunk/data/qcsrc/server/cl_weaponsystem.qc 2009-10-15 06:02:44 UTC (rev 8134)
+++ trunk/data/qcsrc/server/cl_weaponsystem.qc 2009-10-15 07:20:21 UTC (rev 8135)
@@ -967,7 +967,12 @@
if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
if (!weapon_action(self.weapon, WR_CHECKAMMO1 + secondary))
{
+ // hack to ensure it switches to an OTHER weapon (in case the other fire mode still has ammo, we want that anyway)
+ float w;
+ w = W_WeaponBit(self.weapon);
+ self.weapons &~= w;
W_SwitchWeapon_Force(self, w_getbestweapon(self));
+ self.weapons |= w;
return FALSE;
}
More information about the nexuiz-commits
mailing list