]> git.rm.cloudns.org Git - voretournament/voretournament.git/commitdiff
Fix some issues with weapon reloading
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 31 Jan 2012 14:58:29 +0000 (16:58 +0200)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 31 Jan 2012 14:58:29 +0000 (16:58 +0200)
data/qcsrc/server/cl_weapons.qc
data/qcsrc/server/w_grabber.qc

index 8f4f600246344bd3eccfb2788a4cb7b6e07f0548..3599e378cfc96669c282450dd2081844fd1d74a0 100644 (file)
@@ -1,5 +1,9 @@
 void W_TriggerReload()\r
 {\r
+       // don't trigger reload if holding the weapon attack button\r
+       if(self.BUTTON_ATCK2)\r
+               return;\r
+\r
     weapon_action(self.weapon, WR_RELOAD);\r
 }\r
 \r
index 6f50fb38fc7fcb88d93627e691a305354204d6ea..be01df85f85cf7c5e7e47e1fcdb398669e17f02e 100644 (file)
@@ -98,7 +98,7 @@ float w_grabber(float req)
                grabbered_fuel = cvar("g_balance_grabber_primary_grabbered_fuel");\r
                // forced reload\r
                if(cvar("g_balance_grabber_reload_ammo") && self.clip_load < min(cvar("g_balance_grabber_primary_ammo"), cvar("g_balance_grabber_secondary_ammo"))\r
-               && !(self.clip_load >= (time - self.grabber_time_fueldecrease) * grabbered_fuel && self.BUTTON_ATCK2)) // not while hooked and still have ammo to stay hooked\r
+               && !(self.clip_load >= (time - self.grabber_time_fueldecrease) * grabbered_fuel && self.grabber)) // not while hooked and still have ammo to stay hooked\r
                {\r
                        if(self.ammo_fuel >= 1) // we only have one weapon in VT, so nothing else to switch to if we're out of ammo\r
                                weapon_action(self.weapon, WR_RELOAD);\r