]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/bot/havocbot/havocbot.qc
Merge remote-tracking branch 'origin/master' into samual/weapons
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / bot / havocbot / havocbot.qc
index a0e6bfffd42926004503c8e9f63b8e9eaaa07836..fb79a3318c37748721e5da4bcf4e7beff7990629 100644 (file)
@@ -92,7 +92,7 @@ void havocbot_ai()
 
                if(self.weapons)
                {
-                       weapon_action(self.weapon, WR_AIM);
+                       WEP_ACTION(self.weapon, WR_AIM);
                        if (autocvar_bot_nofire || IS_INDEPENDENT_PLAYER(self))
                        {
                                self.BUTTON_ATCK = FALSE;
@@ -544,7 +544,7 @@ void havocbot_movetogoal()
        else if(self.aistatus & AI_STATUS_OUT_JUMPPAD)
                self.aistatus &= ~AI_STATUS_OUT_JUMPPAD;
 
-       // If there is a trigger_hurt right below try to use the jetpack or make a rocketjump
+       // If there is a trigger_hurt right below try to use the jetpack or make a rocketjump // WEAPONTODO: move this to bot think!
        if(skill>6)
        if (!(self.flags & FL_ONGROUND))
        {
@@ -590,10 +590,10 @@ void havocbot_movetogoal()
 
                        return;
                }
-               else if(self.health>autocvar_g_balance_rocketlauncher_damage*0.5)
+               else if(self.health>WEP_CVAR(devastator, damage)*0.5)
                {
                        if(self.velocity_z < 0)
-                       if(client_hasweapon(self, WEP_ROCKET_LAUNCHER, TRUE, FALSE))
+                       if(client_hasweapon(self, WEP_DEVASTATOR, TRUE, FALSE))
                        {
                                self.movement_x = maxspeed;
 
@@ -607,10 +607,10 @@ void havocbot_movetogoal()
                                        return;
                                }
 
-                               self.switchweapon = WEP_ROCKET_LAUNCHER;
+                               self.switchweapon = WEP_DEVASTATOR;
                                self.v_angle_x = 90;
                                self.BUTTON_ATCK = TRUE;
-                               self.rocketjumptime = time + autocvar_g_balance_rocketlauncher_detonatedelay;
+                               self.rocketjumptime = time + WEP_CVAR(devastator, detonatedelay);
                                return;
                        }
                }
@@ -956,7 +956,7 @@ float havocbot_chooseweapon_checkreload(float new_weapon)
                for(i = WEP_FIRST; i <= WEP_LAST; ++i)
                {
                        // if we are out of ammo for all other weapons, it's an emergency to switch to anything else
-                       if (weapon_action(i, WR_CHECKAMMO1) + weapon_action(i, WR_CHECKAMMO2))
+                       if (WEP_ACTION(i, WR_CHECKAMMO1) + WEP_ACTION(i, WR_CHECKAMMO2))
                                other_weapon_available = TRUE;
                }
                if(other_weapon_available)