Grabber: Don't behave differently while the player is crouching. Fixes a bug
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 12 Jul 2011 14:42:34 +0000 (17:42 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 12 Jul 2011 14:42:34 +0000 (17:42 +0300)
data/qcsrc/server/g_grabber.qc
data/qcsrc/server/w_grabber.qc

index 264ce29..a92ceda 100644 (file)
@@ -356,16 +356,7 @@ void GrabberFrame()
                self.grabber_state &~= GRABBER_WAITING_FOR_RELEASE;\r
 \r
                self.grabber_state &~= GRABBER_RELEASING;\r
-               if(self.BUTTON_CROUCH)\r
-               {\r
-                       self.grabber_state &~= GRABBER_PULLING;\r
-                       //self.grabber_state |= GRABBER_RELEASING;\r
-               }\r
-               else\r
-               {\r
-                       self.grabber_state |= GRABBER_PULLING;\r
-                       //self.grabber_state &~= GRABBER_RELEASING;\r
-               }\r
+               self.grabber_state |= GRABBER_PULLING;\r
        }\r
 \r
        if(self.weapon != WEP_GRABBER)\r
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
-               if (self.BUTTON_CROUCH)\r
+               self.grabber_state |= GRABBER_PULLING;\r
+               self.grabber_state &~= GRABBER_RELEASING;\r
+\r
+               if (self.BUTTON_ATCK)\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
-                       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