]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Check if melee is enabled when checking ammo
authorMario <zacjardine@y7mail.com>
Thu, 27 Nov 2014 06:11:52 +0000 (17:11 +1100)
committerMario <zacjardine@y7mail.com>
Thu, 27 Nov 2014 06:11:52 +0000 (17:11 +1100)
qcsrc/common/weapons/w_shotgun.qc

index 9e87f8c85a9890e95236f5cd4e60c5bf4cd74894..88c604c0aba912cc5712dbd524f82d5e74be440a 100644 (file)
@@ -265,8 +265,9 @@ float W_Shotgun(float req)
                }
                case WR_CHECKAMMO2:
                {
-                       // melee does not use ammo
-                       return TRUE;
+                       if(WEP_CVAR(shotgun, secondary))
+                               return TRUE; // melee does not use ammo
+                       return FALSE; // secondary unavailable
                }
                case WR_CONFIG:
                {