Grabber: Don't behave differently while the player is crouching. Fixes a bug
[voretournament/voretournament.git] / data / qcsrc / server / w_grabber.qc
index 50b6add..5259890 100644 (file)
@@ -174,30 +174,19 @@ float w_grabber(float req)
                        self.grabber_time_fueldecrease = time + cvar("g_balance_grabber_primary_grabbered_time_free");\r
                }\r
 \r
                        self.grabber_time_fueldecrease = time + cvar("g_balance_grabber_primary_grabbered_time_free");\r
                }\r
 \r
-               if (self.BUTTON_CROUCH)\r
+               self.grabber_state |= GRABBER_PULLING;\r
+               self.grabber_state &~= GRABBER_RELEASING;\r
+\r
+               if (self.BUTTON_ATCK)\r
                {\r
                {\r
-                       self.grabber_state &~= GRABBER_PULLING;\r
-                       if (self.BUTTON_ATCK)\r
-                               self.grabber_state &~= GRABBER_RELEASING;\r
-                       else\r
-                               self.grabber_state |= GRABBER_RELEASING;\r
+                       // already fired\r
+                       if(self.grabber)\r
+                               self.grabber_state |= GRABBER_WAITING_FOR_RELEASE;\r
                }\r
                else\r
                {\r
                }\r
                else\r
                {\r
-                       self.grabber_state |= GRABBER_PULLING;\r
-                       self.grabber_state &~= GRABBER_RELEASING;\r
-\r
-                       if (self.BUTTON_ATCK)\r
-                       {\r
-                               // already fired\r
-                               if(self.grabber)\r
-                                       self.grabber_state |= GRABBER_WAITING_FOR_RELEASE;\r
-                       }\r
-                       else\r
-                       {\r
-                               self.grabber_state |= GRABBER_REMOVING;\r
-                               self.grabber_state &~= GRABBER_WAITING_FOR_RELEASE;\r
-                       }\r
+                       self.grabber_state |= GRABBER_REMOVING;\r
+                       self.grabber_state &~= GRABBER_WAITING_FOR_RELEASE;\r
                }\r
        }\r
        else if (req == WR_PRECACHE)\r
                }\r
        }\r
        else if (req == WR_PRECACHE)\r