r4941 - trunk/data/qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Thu Oct 30 07:19:42 EDT 2008
Author: div0
Date: 2008-10-30 07:19:42 -0400 (Thu, 30 Oct 2008)
New Revision: 4941
Modified:
trunk/data/qcsrc/server/cl_weapons.qc
Log:
fix throw logic
Modified: trunk/data/qcsrc/server/cl_weapons.qc
===================================================================
--- trunk/data/qcsrc/server/cl_weapons.qc 2008-10-30 10:28:10 UTC (rev 4940)
+++ trunk/data/qcsrc/server/cl_weapons.qc 2008-10-30 11:19:42 UTC (rev 4941)
@@ -207,7 +207,7 @@
// toss current weapon
void W_ThrowWeapon(vector velo, vector delta, float doreduce)
{
- local float w, a, wb;
+ local float w, a, wb, wa;
w = self.weapon;
if (w == 0)
@@ -224,8 +224,20 @@
return;
wb = W_WeaponBit(w);
+ wa = W_AmmoItemCode(w);
+ if(!wb)
+ return;
if(self.weapons & wb != wb)
return;
+ if(start_weapons & wb)
+ {
+ if(wa == IT_SUPERWEAPON && start_items & IT_UNLIMITED_SUPERWEAPONS)
+ return;
+ if(wa != IT_SUPERWEAPON && start_items & IT_UNLIMITED_WEAPON_AMMO)
+ return;
+ if(wa == 0)
+ return;
+ }
self.weapons = self.weapons - wb;
W_SwitchWeapon_Force(self, w_getbestweapon(self));
More information about the nexuiz-commits
mailing list