]> git.rm.cloudns.org Git - voretournament/voretournament.git/commitdiff
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 264ce29e40a9a5742785dc417f7eacc2cb30b09e..a92cedab7cb2ef880bf6aa24655f81d45c8bfe0f 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 50b6addb6fe8ddb1a97b2ab1eeabfd58812cea9e..5259890474aba012f7ad08a527cd0711ba05de62 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