X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fserver%2Fbot%2Fhavocbot%2Frole_onslaught.qc;h=dc942a38212fc4bbb0d47f77a3508df42798e517;hp=6b0ccaa0d51764431871b3161247290072dae46d;hb=786db02b0c9aa618c581b7c3fe7392ad114797d8;hpb=8a390ed02bde47c98a5e6bd47c7eb9b1cb3cd1dc diff --git a/qcsrc/server/bot/havocbot/role_onslaught.qc b/qcsrc/server/bot/havocbot/role_onslaught.qc index 6b0ccaa0d..dc942a382 100644 --- a/qcsrc/server/bot/havocbot/role_onslaught.qc +++ b/qcsrc/server/bot/havocbot/role_onslaught.qc @@ -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 == COLOR_TEAM1) + if(self.team == NUM_TEAM_1) { if( (cp2.isgenneighbor_blue || cp2.iscpneighbor_blue) && !(cp2.isgenneighbor_red || cp2.iscpneighbor_red) ) continue; } - else if(self.team == COLOR_TEAM2) + else if(self.team == NUM_TEAM_2) { if( (cp2.isgenneighbor_red || cp2.iscpneighbor_red) && !(cp2.isgenneighbor_blue || cp2.iscpneighbor_blue) ) continue; @@ -156,7 +156,7 @@ void havocbot_goalrating_ons_controlpoints_attack(float ratingscale) cp = world; for (; cp1; cp1 = cp1.chain) { - if not(cp1.wpconsidered) + if (!cp1.wpconsidered) continue; if(cp1.wpcost