From: Rudolf Polzer Date: Fri, 28 Oct 2011 21:45:19 +0000 (+0200) Subject: simplify bot-should-attack logic (PLEASE TEST) X-Git-Tag: xonotic-v0.6.0~35^2~75 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=ac4cb770422c8abf5dfb33f7c0fcb41604f31b5b;p=xonotic%2Fxonotic-data.pk3dir.git simplify bot-should-attack logic (PLEASE TEST) --- diff --git a/qcsrc/server/bot/havocbot/roles.qc b/qcsrc/server/bot/havocbot/roles.qc index d0c10651b..91eb2ec1a 100644 --- a/qcsrc/server/bot/havocbot/roles.qc +++ b/qcsrc/server/bot/havocbot/roles.qc @@ -162,21 +162,12 @@ void havocbot_goalrating_enemyplayers(float ratingscale, vector org, float sradi FOR_EACH_PLAYER(head) { // TODO: Merge this logic with the bot_shouldattack function - if (self != head) - if (head.health > 0) - if ((noteam && (!bot_ignore_bots || clienttype(head) == CLIENTTYPE_REAL)) || head.team != self.team) + if(bot_shouldattack(head)) { distance = vlen(head.origin - org); if (distance < 100 || distance > sradius) continue; - if (head.freezetag_frozen) - continue; - - if(g_minstagib) - if(head.items & IT_STRENGTH) - continue; - // rate only visible enemies /* traceline(self.origin + self.view_ofs, head.origin, MOVE_NOMONSTERS, self);