Don't skip some important checks for the grabber while eaten
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 16 Jul 2011 14:51:46 +0000 (17:51 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 16 Jul 2011 14:51:46 +0000 (17:51 +0300)
data/qcsrc/server/w_grabber.qc

index a41c01f..0eedd51 100644 (file)
@@ -69,10 +69,7 @@ void spawnfunc_weapon_grabber (void)
 float w_grabber(float req)\r
 {\r
        if(self.stat_eaten) // we can't use weapons while in the stomach\r
-       {\r
                self.grabber_state |= GRABBER_REMOVING;\r
-               return FALSE;\r
-       }\r
 \r
        float ammo_amount;\r
        float grabbered_time_max, grabbered_fuel;\r
@@ -95,6 +92,8 @@ float w_grabber(float req)
                {\r
                        if (self.BUTTON_ATCK && weapon_action(self.weapon, WR_CHECKAMMO1))\r
                        {\r
+                               if(self.stat_eaten) // we can't use weapons while in the stomach\r
+                                       return FALSE;\r
                                if(time < self.weapon_delay)\r
                                        return FALSE;\r
 \r
@@ -113,6 +112,9 @@ float w_grabber(float req)
                        }\r
                        if (self.BUTTON_ATCK2 && weapon_action(self.weapon, WR_CHECKAMMO2))\r
                        {\r
+                       \r
+                               if(self.stat_eaten) // we can't use weapons while in the stomach\r
+                                       return FALSE;\r
                                if (weapon_prepareattack(1, cvar("g_balance_grabber_secondary_refire")))\r
                                {\r
                                        W_Grabber_Attack2();\r