[nexuiz-commits] r8137 - trunk/data/qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Thu Oct 15 03:22:31 EDT 2009
Author: div0
Date: 2009-10-15 03:22:31 -0400 (Thu, 15 Oct 2009)
New Revision: 8137
Modified:
trunk/data/qcsrc/server/cl_weaponsystem.qc
Log:
and make it work :P
Modified: trunk/data/qcsrc/server/cl_weaponsystem.qc
===================================================================
--- trunk/data/qcsrc/server/cl_weaponsystem.qc 2009-10-15 07:21:53 UTC (rev 8136)
+++ trunk/data/qcsrc/server/cl_weaponsystem.qc 2009-10-15 07:22:31 UTC (rev 8137)
@@ -968,13 +968,13 @@
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;
+ float w, ww;
w = W_WeaponBit(self.weapon);
self.weapons &~= w;
- if(w_getbestweapon(self) == 0)
- self.weapons |= w; // if we have nothing ELSE, stay
- W_SwitchWeapon_Force(self, w_getbestweapon(self));
+ ww = w_getbestweapon(self);
self.weapons |= w;
+ if(ww)
+ W_SwitchWeapon_Force(self, ww);
return FALSE;
}
More information about the nexuiz-commits
mailing list