]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/bot/havocbot/havocbot.qc
Merge branch 'master' into TimePath/unified_weapons
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / bot / havocbot / havocbot.qc
index 629009761fbcece18ce7d57a4f2094d6ef842eef..06076689134f5c7afbf18eed37df77a68e6297fb 100644 (file)
@@ -102,7 +102,8 @@ void havocbot_ai()
 
                if(self.weapons)
                {
-                       WEP_ACTION(self.weapon, WR_AIM);
+                       Weapon w = get_weaponinfo(self.weapon);
+                       w.wr_aim(w);
                        if (autocvar_bot_nofire || IS_INDEPENDENT_PLAYER(self))
                        {
                                self.BUTTON_ATCK = false;
@@ -992,8 +993,9 @@ float havocbot_chooseweapon_checkreload(int new_weapon)
                float i, other_weapon_available = false;
                for(i = WEP_FIRST; i <= WEP_LAST; ++i)
                {
+                       Weapon w = get_weaponinfo(i);
                        // if we are out of ammo for all other weapons, it's an emergency to switch to anything else
-                       if (WEP_ACTION(i, WR_CHECKAMMO1) + WEP_ACTION(i, WR_CHECKAMMO2))
+                       if (w.wr_checkammo1(w) + w.wr_checkammo2(w))
                                other_weapon_available = true;
                }
                if(other_weapon_available)
@@ -1008,7 +1010,7 @@ void havocbot_chooseweapon()
        int i;
 
        // ;)
-       if(g_weaponarena_weapons == WEPSET_TUBA)
+       if(g_weaponarena_weapons == WEPSET(TUBA))
        {
                self.switchweapon = WEP_TUBA.m_id;
                return;