]> de.git.xonotic.org Git - voretournament/voretournament.git/blobdiff - data/qcsrc/server/w_grabber.qc
No alt fire if hooked or firing the hook
[voretournament/voretournament.git] / data / qcsrc / server / w_grabber.qc
index 4de8425b4c7446db31e52610e1c7a6fed9e2629b..cbd202b66a864f8dae6107a3a4050975d4cdd14b 100644 (file)
@@ -81,7 +81,7 @@ float w_grabber(float req)
                // determine by distance if this will be primary fire or alternate fire\r
                W_SetupShot (self, TRUE, 0, "", 0); // do this to update w_shotorg\r
                WarpZone_traceline_antilag(self, w_shotorg, w_shotorg + w_shotdir * cvar("g_balance_grabber_secondary_radius"), FALSE, self, ANTILAG_LATENCY(self));\r
-               if(trace_fraction < 1)\r
+               if(trace_fraction < 1 && !self.grabber) // not if hooked or firing the hook\r
                        self.stat_crosshair_style = 1;\r
                else\r
                        self.stat_crosshair_style = 0;\r
@@ -96,7 +96,7 @@ float w_grabber(float req)
                }\r
                else if(self.clip_load >= 0 && !self.stat_eaten) // we're not currently reloading or eaten\r
                {\r
-                       if(trace_fraction >= 1 && self.BUTTON_ATCK && weapon_action(self.weapon, WR_CHECKAMMO1)) // primary attack\r
+                       if(!self.stat_crosshair_style && self.BUTTON_ATCK && weapon_action(self.weapon, WR_CHECKAMMO1)) // primary attack\r
                        {\r
                                if(time < self.weapon_delay)\r
                                        return FALSE;\r