Correct button name
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Mon, 6 Sep 2010 17:16:44 +0000 (20:16 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Mon, 6 Sep 2010 17:16:44 +0000 (20:16 +0300)
data/qcsrc/server/bot/bot.qc
data/qcsrc/server/bot/havocbot/havocbot.qc
data/qcsrc/server/bot/scripting.qc
data/qcsrc/server/cl_client.qc
data/qcsrc/server/cl_physics.qc
data/qcsrc/server/defs.qh
data/qcsrc/server/g_grabber.qc
data/qcsrc/server/g_world.qc
data/qcsrc/server/playerdemo.qc
data/qcsrc/server/t_quake.qc
data/qcsrc/server/w_grabber.qc

index e67d89f..de6bed1 100644 (file)
@@ -75,7 +75,7 @@ void bot_think()
        self.BUTTON_ATCK2 = 0;
        self.BUTTON_ZOOM = 0;
        self.BUTTON_CROUCH = 0;
-       self.BUTTON_GRABBER = 0;
+       self.BUTTON_JETPACK = 0;
        self.BUTTON_INFO = 0;
        self.button8 = 0;
        self.BUTTON_CHAT = 0;
index ae03fac..1228719 100644 (file)
@@ -439,7 +439,7 @@ void havocbot_movetogoal()
                }
 
                // Flying
-               self.BUTTON_GRABBER = TRUE;
+               self.BUTTON_JETPACK = TRUE;
                if(self.navigation_jetpack_point_z - PL_MAX_z + PL_MIN_z < self.origin_z)
                {
                        self.movement_x = dir * v_forward * maxspeed;
@@ -525,11 +525,11 @@ void havocbot_movetogoal()
                        {
                                if(self.velocity_z<0)
                                {
-                                       self.BUTTON_GRABBER = TRUE;
+                                       self.BUTTON_JETPACK = TRUE;
                                }
                        }
                        else
-                               self.BUTTON_GRABBER = TRUE;
+                               self.BUTTON_JETPACK = TRUE;
 
                        // If there is no goal try to move forward
 
index b92badc..1628641 100644 (file)
@@ -863,7 +863,7 @@ float bot_presskeys()
        self.BUTTON_ATCK = FALSE;
        self.BUTTON_ATCK2 = FALSE;
        self.BUTTON_USE = FALSE;
-       self.BUTTON_GRABBER = FALSE;
+       self.BUTTON_JETPACK = FALSE;
        self.BUTTON_CHAT = FALSE;
        self.BUTTON_DIGEST = FALSE;
        self.BUTTON_REGURGITATE = FALSE;        
@@ -897,7 +897,7 @@ float bot_presskeys()
                self.BUTTON_USE = TRUE;
 
        if(self.bot_cmd_keys & BOT_CMD_KEY_GRABBER)
-               self.BUTTON_GRABBER = TRUE;
+               self.BUTTON_JETPACK = TRUE;
 
        if(self.bot_cmd_keys & BOT_CMD_KEY_CHAT)
                self.BUTTON_CHAT = TRUE;
@@ -1033,7 +1033,7 @@ float bot_cmd_pause()
        self.BUTTON_USE          = 0;
        self.BUTTON_ATCK         = 0;
        self.BUTTON_JUMP         = 0;
-       self.BUTTON_GRABBER         = 0;
+       self.BUTTON_JETPACK         = 0;
        self.BUTTON_CHAT         = 0;
        self.BUTTON_ATCK2        = 0;
        self.BUTTON_CROUCH       = 0;
index 11cf27c..9f5eb15 100644 (file)
@@ -2417,7 +2417,7 @@ void PlayerPreThink (void)
                        {\r
                                if(frametime)\r
                                        player_anim();\r
-                               button_pressed = (self.BUTTON_ATCK || self.BUTTON_JUMP || self.BUTTON_ATCK2 || self.BUTTON_GRABBER || self.BUTTON_USE);\r
+                               button_pressed = (self.BUTTON_ATCK || self.BUTTON_JUMP || self.BUTTON_ATCK2 || self.BUTTON_JETPACK || self.BUTTON_USE);\r
                                force_respawn = (g_lms || (g_ca) || cvar("g_forced_respawn"));\r
                                if (self.deadflag == DEAD_DYING)\r
                                {\r
index 1634961..7c5c9b1 100644 (file)
@@ -585,7 +585,7 @@ void SV_PlayerPhysics()
 \r
        anticheat_physics();\r
 \r
-       buttons = self.BUTTON_ATCK + 2 * self.BUTTON_JUMP + 4 * self.BUTTON_ATCK2 + 8 * self.BUTTON_ZOOM + 16 * self.BUTTON_CROUCH + 32 * self.BUTTON_GRABBER + 64 * self.BUTTON_USE + 128 * (self.movement_x < 0) + 256 * (self.movement_x > 0) + 512 * (self.movement_y < 0) + 1024 * (self.movement_y > 0);\r
+       buttons = self.BUTTON_ATCK + 2 * self.BUTTON_JUMP + 4 * self.BUTTON_ATCK2 + 8 * self.BUTTON_ZOOM + 16 * self.BUTTON_CROUCH + 32 * self.BUTTON_JETPACK + 64 * self.BUTTON_USE + 128 * (self.movement_x < 0) + 256 * (self.movement_x > 0) + 512 * (self.movement_y < 0) + 1024 * (self.movement_y > 0);\r
 \r
        if(!buttons)\r
                c = "x";\r
@@ -632,7 +632,7 @@ void SV_PlayerPhysics()
        {\r
                // slight annoyance for nick change scripts\r
                self.movement = -1 * self.movement;\r
-               self.BUTTON_ATCK = self.BUTTON_JUMP = self.BUTTON_ATCK2 = self.BUTTON_ZOOM = self.BUTTON_CROUCH = self.BUTTON_GRABBER = self.BUTTON_USE = 0;\r
+               self.BUTTON_ATCK = self.BUTTON_JUMP = self.BUTTON_ATCK2 = self.BUTTON_ZOOM = self.BUTTON_CROUCH = self.BUTTON_JETPACK = self.BUTTON_USE = 0;\r
 \r
                if(self.nickspamcount >= cvar("g_nick_flood_penalty_red")) // if you are persistent and the slight annoyance above does not stop you, I'll show you!\r
                {\r
@@ -902,7 +902,7 @@ void SV_PlayerPhysics()
                        PM_Accelerate(wishdir, wishspeed, wishspeed, sv_accelerate*maxspd_mod, 1, 0);\r
                }\r
        }\r
-       else if ((self.items & IT_JETPACK) && self.BUTTON_GRABBER && (!cvar("g_jetpack_fuel") || self.ammo_fuel >= 0.01 || self.items & IT_UNLIMITED_WEAPON_AMMO))\r
+       else if ((self.items & IT_JETPACK) && self.BUTTON_JETPACK && (!cvar("g_jetpack_fuel") || self.ammo_fuel >= 0.01 || self.items & IT_UNLIMITED_WEAPON_AMMO))\r
        {\r
                //makevectors(self.v_angle_y * '0 1 0');\r
                makevectors(self.v_angle);\r
@@ -1004,7 +1004,7 @@ void SV_PlayerPhysics()
        else if (self.flags & FL_ONGROUND)\r
        {\r
                // we get here if we ran out of ammo\r
-               if((self.items & IT_JETPACK) && self.BUTTON_GRABBER && !(buttons_prev & 32))\r
+               if((self.items & IT_JETPACK) && self.BUTTON_JETPACK && !(buttons_prev & 32))\r
                        sprint(self, "You don't have any fuel for the ^2Jetpack\n");\r
 \r
                // walking\r
@@ -1065,7 +1065,7 @@ void SV_PlayerPhysics()
        {\r
                float wishspeed0;\r
                // we get here if we ran out of ammo\r
-               if((self.items & IT_JETPACK) && self.BUTTON_GRABBER && !(buttons_prev & 32))\r
+               if((self.items & IT_JETPACK) && self.BUTTON_JETPACK && !(buttons_prev & 32))\r
                        sprint(self, "You don't have any fuel for the ^2Jetpack\n");\r
 \r
                if(maxspd_mod < 1)\r
index 0e2bce8..c3b0e83 100644 (file)
@@ -7,7 +7,7 @@ float require_spawnfunc_prefix; // if this float exists, only functions with spa
 #define BUTTON_ATCK2       button3\r
 #define BUTTON_ZOOM        button4\r
 #define BUTTON_CROUCH      button5\r
-#define BUTTON_GRABBER        button6\r
+#define BUTTON_JETPACK        button6\r
 #define BUTTON_INFO        button7\r
 #define BUTTON_CHAT        buttonchat\r
 #define BUTTON_USE         buttonuse\r
index 5202c1c..dee5461 100644 (file)
@@ -327,7 +327,7 @@ void FireGrabber (void)
 //  voidGrabberFrame()\r
 //  {\r
 //         // this function has been modified for Voretournament\r
-// -       if (self.BUTTON_GRABBER && g_grabber)\r
+// -       if (self.BUTTON_JETPACK && g_grabber)\r
 //         {\r
 // -               if (!self.grabber && self.grabber_time <= time && !self.button6_pressed_before)\r
 // -                       if (timeoutStatus != 2) //only allow the player to fire the grabber if the game is not paused (timeout)\r
@@ -338,7 +338,7 @@ void FireGrabber (void)
 //                 if (self.grabber)\r
 //                         RemoveGrabber(self);\r
 //         }\r
-// -       self.button6_pressed_before = self.BUTTON_GRABBER;\r
+// -       self.button6_pressed_before = self.BUTTON_JETPACK;\r
 //         /*\r
 //         // if I have no grabber or it's not pulling yet, make sure I'm not flying!\r
 //         if((self.grabber == world || !self.grabber.state) && self.movetype == MOVETYPE_FLY)\r
@@ -348,7 +348,7 @@ void GrabberFrame()
        if(timeoutStatus != 2 && self.weapon != WEP_GRABBER)\r
        {\r
                // offhand grabber controls\r
-               if(self.BUTTON_GRABBER)\r
+               if(self.BUTTON_JETPACK)\r
                {\r
                        if not(self.grabber || (self.grabber_state & GRABBER_WAITING_FOR_RELEASE))\r
                        {\r
@@ -376,10 +376,10 @@ void GrabberFrame()
        }\r
        else if(!(self.items & IT_JETPACK) && self.switchweapon != WEP_GRABBER)\r
        {\r
-               if(self.BUTTON_GRABBER && !self.grabber_switchweapon)\r
+               if(self.BUTTON_JETPACK && !self.grabber_switchweapon)\r
                        W_SwitchWeapon(WEP_GRABBER);\r
        }\r
-       self.grabber_switchweapon = self.BUTTON_GRABBER;\r
+       self.grabber_switchweapon = self.BUTTON_JETPACK;\r
 \r
        if(self.weapon != WEP_GRABBER)\r
        {\r
index 0355a36..d06624c 100644 (file)
@@ -1156,7 +1156,7 @@ void IntermissionThink()
                return;\r
 \r
        if(!mapvote_initialized)\r
-               if (time < intermission_exittime + 10 && !self.BUTTON_ATCK && !self.BUTTON_JUMP && !self.BUTTON_ATCK2 && !self.BUTTON_GRABBER && !self.BUTTON_USE)\r
+               if (time < intermission_exittime + 10 && !self.BUTTON_ATCK && !self.BUTTON_JUMP && !self.BUTTON_ATCK2 && !self.BUTTON_JETPACK && !self.BUTTON_USE)\r
                        return;\r
 \r
        MapVote_Start();\r
index 12016f6..90882f0 100644 (file)
@@ -55,7 +55,7 @@ void playerdemo_open_write(string f)
        PLAYERDEMO_FIELD(func,float,BUTTON_ATCK) \
        PLAYERDEMO_FIELD(func,float,BUTTON_ATCK2) \
        PLAYERDEMO_FIELD(func,float,BUTTON_CROUCH) \
-       PLAYERDEMO_FIELD(func,float,BUTTON_GRABBER) \
+       PLAYERDEMO_FIELD(func,float,BUTTON_JETPACK) \
        PLAYERDEMO_FIELD(func,float,BUTTON_USE) \
        PLAYERDEMO_FIELD(func,float,flags) \
        // end of list
index 619b6f0..b917287 100644 (file)
@@ -22,7 +22,7 @@ void junk_function ()
        self.exteriormodeltoclient = world;\r
        self.glow_trail = 0;\r
        self.tag_entity = world;\r
-       self.BUTTON_GRABBER = 0;\r
+       self.BUTTON_JETPACK = 0;\r
        self.BUTTON_INFO = 0;\r
        self.button8 = 0;\r
        self.pitch_speed = 0;\r
index 63293e4..5a7e0e9 100644 (file)
@@ -51,7 +51,7 @@ float w_grabber(float req)
        }\r
        else if (req == WR_THINK)\r
        {\r
-               if (self.BUTTON_ATCK || (!(self.items & IT_JETPACK) && self.BUTTON_GRABBER))\r
+               if (self.BUTTON_ATCK || (!(self.items & IT_JETPACK) && self.BUTTON_JETPACK))\r
                {\r
                        if(time < self.weapon_delay)\r
                                return FALSE;\r
@@ -129,7 +129,7 @@ float w_grabber(float req)
                if (self.BUTTON_CROUCH)\r
                {\r
                        self.grabber_state &~= GRABBER_PULLING;\r
-                       if (self.BUTTON_ATCK || (!(self.items & IT_JETPACK) && self.BUTTON_GRABBER))\r
+                       if (self.BUTTON_ATCK || (!(self.items & IT_JETPACK) && self.BUTTON_JETPACK))\r
                                self.grabber_state &~= GRABBER_RELEASING;\r
                        else\r
                                self.grabber_state |= GRABBER_RELEASING;\r
@@ -139,7 +139,7 @@ float w_grabber(float req)
                        self.grabber_state |= GRABBER_PULLING;\r
                        self.grabber_state &~= GRABBER_RELEASING;\r
 \r
-                       if (self.BUTTON_ATCK || (!(self.items & IT_JETPACK) && self.BUTTON_GRABBER))\r
+                       if (self.BUTTON_ATCK || (!(self.items & IT_JETPACK) && self.BUTTON_JETPACK))\r
                        {\r
                                // already fired\r
                                if(self.grabber)\r