]> git.xonotic.org Git - voretournament/voretournament.git/blobdiff - data/qcsrc/server/w_grabber.qc
Rework the buttons yet again. Both grabber modes is on the alt fire button, while...
[voretournament/voretournament.git] / data / qcsrc / server / w_grabber.qc
index bd5f3431e72603f42ea254fa50e602580fe61b6c..611b69c253afa8577c4602fb56e76f03fd8eb6d9 100644 (file)
@@ -89,14 +89,14 @@ 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 >= 0 && !(self.clip_load >= (time - self.grabber_time_fueldecrease) * grabbered_fuel && self.BUTTON_ATCK)) // not while hooked and still have ammo to stay hooked\r
+               && self.clip_load >= 0 && !(self.clip_load >= (time - self.grabber_time_fueldecrease) * grabbered_fuel && self.BUTTON_ATCK2)) // 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
                }\r
                else if(self.clip_load >= 0 && !self.stat_eaten) // we're not currently reloading or eaten\r
                {\r
-                       if(!self.stat_crosshair_style && self.BUTTON_ATCK && weapon_action(self.weapon, WR_CHECKAMMO1)) // primary attack\r
+                       if(!self.stat_crosshair_style && self.BUTTON_ATCK2 && weapon_action(self.weapon, WR_CHECKAMMO1)) // primary attack\r
                        {\r
                                if(time < self.weapon_delay)\r
                                        return FALSE;\r
@@ -114,7 +114,7 @@ float w_grabber(float req)
                                        weapon_thinkf(WFRAME_FIRE1, cvar("g_balance_grabber_primary_animtime"), w_ready);                               \r
                                }\r
                        }\r
-                       else if (self.BUTTON_ATCK && weapon_action(self.weapon, WR_CHECKAMMO2)) // secondary attack\r
+                       else if (self.BUTTON_ATCK2 && weapon_action(self.weapon, WR_CHECKAMMO2)) // secondary attack\r
                        {\r
                                if (weapon_prepareattack(1, cvar("g_balance_grabber_secondary_refire")))\r
                                {\r
@@ -180,7 +180,7 @@ float w_grabber(float req)
                self.grabber_state |= GRABBER_PULLING;\r
                self.grabber_state &~= GRABBER_RELEASING;\r
 \r
-               if (self.BUTTON_ATCK)\r
+               if (self.BUTTON_ATCK2)\r
                {\r
                        // already fired\r
                        if(self.grabber)\r