]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/bot/havocbot/role_onslaught.qc
Merge remote-tracking branch 'origin/master' into samual/serverlist
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / bot / havocbot / role_onslaught.qc
index f50a87fc7a97a0ca6121c8212899c60215524c32..ab5372833323de4c6be95bb7dbb3ca26b2143986 100644 (file)
@@ -39,7 +39,7 @@ void havocbot_goalrating_ons_offenseitems(float ratingscale, vector org, float s
        for(i = WEP_FIRST; i <= WEP_LAST ; ++i)
        {
                // Find weapon
-               if(WEPSET_CONTAINS_EW(self, i))
+               if(self.weapons & WepSet_FromWeapon(i))
                if(++c>=4)
                        break;
        }
@@ -59,7 +59,7 @@ void havocbot_goalrating_ons_offenseitems(float ratingscale, vector org, float s
        {
                // gather health and armor only
                if (head.solid)
-               if ( ((head.health || head.armorvalue) && needarmor) || (!WEPSET_EMPTY_E(head) && needweapons ) )
+               if ( ((head.health || head.armorvalue) && needarmor) || (head.weapons && needweapons ) )
                if (vlen(head.origin - org) < sradius)
                {
                        t = head.bot_pickupevalfunc(self, head);
@@ -127,12 +127,12 @@ void havocbot_goalrating_ons_controlpoints_attack(float ratingscale)
                        continue;
 
                // Ignore owned controlpoints
-               if(self.team == FL_TEAM_1)
+               if(self.team == NUM_TEAM_1)
                {
                        if( (cp2.isgenneighbor_blue || cp2.iscpneighbor_blue) && !(cp2.isgenneighbor_red || cp2.iscpneighbor_red) )
                                continue;
                }
-               else if(self.team == FL_TEAM_2)
+               else if(self.team == NUM_TEAM_2)
                {
                        if( (cp2.isgenneighbor_red || cp2.iscpneighbor_red) && !(cp2.isgenneighbor_blue || cp2.iscpneighbor_blue) )
                                continue;