From: MirceaKitsune Date: Tue, 31 Jan 2012 14:58:29 +0000 (+0200) Subject: Fix some issues with weapon reloading X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=75dde2f1a054dbe0703184301f4f4bc1319cc550;p=voretournament%2Fvoretournament.git Fix some issues with weapon reloading --- diff --git a/data/qcsrc/server/cl_weapons.qc b/data/qcsrc/server/cl_weapons.qc index 8f4f6002..3599e378 100644 --- a/data/qcsrc/server/cl_weapons.qc +++ b/data/qcsrc/server/cl_weapons.qc @@ -1,5 +1,9 @@ void W_TriggerReload() { + // don't trigger reload if holding the weapon attack button + if(self.BUTTON_ATCK2) + return; + weapon_action(self.weapon, WR_RELOAD); } diff --git a/data/qcsrc/server/w_grabber.qc b/data/qcsrc/server/w_grabber.qc index 6f50fb38..be01df85 100644 --- a/data/qcsrc/server/w_grabber.qc +++ b/data/qcsrc/server/w_grabber.qc @@ -98,7 +98,7 @@ float w_grabber(float req) grabbered_fuel = cvar("g_balance_grabber_primary_grabbered_fuel"); // forced reload if(cvar("g_balance_grabber_reload_ammo") && self.clip_load < min(cvar("g_balance_grabber_primary_ammo"), cvar("g_balance_grabber_secondary_ammo")) - && !(self.clip_load >= (time - self.grabber_time_fueldecrease) * grabbered_fuel && self.BUTTON_ATCK2)) // not while hooked and still have ammo to stay hooked + && !(self.clip_load >= (time - self.grabber_time_fueldecrease) * grabbered_fuel && self.grabber)) // not while hooked and still have ammo to stay hooked { if(self.ammo_fuel >= 1) // we only have one weapon in VT, so nothing else to switch to if we're out of ammo weapon_action(self.weapon, WR_RELOAD);