From 5b79c6de075cd3a8f40fc01a28fefd9b8d3e0a2d Mon Sep 17 00:00:00 2001 From: MirceaKitsune Date: Mon, 18 Apr 2011 18:31:16 +0300 Subject: [PATCH] An added check to make sure we can only fire when we have enough ammo (an issue due to something I forgot). Should fix the minus ammo bug. --- data/qcsrc/server/w_grabber.qc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/qcsrc/server/w_grabber.qc b/data/qcsrc/server/w_grabber.qc index b9ac88cc..30d7131c 100644 --- a/data/qcsrc/server/w_grabber.qc +++ b/data/qcsrc/server/w_grabber.qc @@ -87,7 +87,7 @@ float w_grabber(float req) } else if not(self.clip_load < 0) // we're not currently reloading { - if (self.BUTTON_ATCK) + if (self.BUTTON_ATCK && weapon_action(self.weapon, WR_CHECKAMMO1)) { if(time < self.weapon_delay) return FALSE; @@ -105,7 +105,7 @@ float w_grabber(float req) weapon_thinkf(WFRAME_FIRE1, cvar("g_balance_grabber_primary_animtime"), w_ready); } } - if (self.BUTTON_ATCK2) + if (self.BUTTON_ATCK2 && weapon_action(self.weapon, WR_CHECKAMMO2)) { if (weapon_prepareattack(1, cvar("g_balance_grabber_secondary_refire"))) { -- 2.39.2