An added check to make sure we can only fire when we have enough ammo (an issue due...
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Mon, 18 Apr 2011 15:31:16 +0000 (18:31 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Mon, 18 Apr 2011 15:31:16 +0000 (18:31 +0300)
data/qcsrc/server/w_grabber.qc

index b9ac88c..30d7131 100644 (file)
@@ -87,7 +87,7 @@ float w_grabber(float req)
                }\r
                else if not(self.clip_load < 0) // we're not currently reloading\r
                {\r
-                       if (self.BUTTON_ATCK)\r
+                       if (self.BUTTON_ATCK && weapon_action(self.weapon, WR_CHECKAMMO1))\r
                        {\r
                                if(time < self.weapon_delay)\r
                                        return FALSE;\r
@@ -105,7 +105,7 @@ float w_grabber(float req)
                                        weapon_thinkf(WFRAME_FIRE1, cvar("g_balance_grabber_primary_animtime"), w_ready);                               \r
                                }\r
                        }\r
-                       if (self.BUTTON_ATCK2)\r
+                       if (self.BUTTON_ATCK2 && weapon_action(self.weapon, WR_CHECKAMMO2))\r
                        {\r
                                if (weapon_prepareattack(1, cvar("g_balance_grabber_secondary_refire")))\r
                                {\r