From: terencehill Date: Fri, 17 Mar 2017 22:00:37 +0000 (+0100) Subject: Don't check if bot isn't getting closer to the current goal if it already reached... X-Git-Tag: xonotic-v0.8.2~44 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=4687094788ab5fb516aeb411ae326af5e00146de;p=xonotic%2Fxonotic-data.pk3dir.git Don't check if bot isn't getting closer to the current goal if it already reached a respawning item --- diff --git a/qcsrc/server/bot/default/havocbot/havocbot.qc b/qcsrc/server/bot/default/havocbot/havocbot.qc index 63a9577fc..42f51af8c 100644 --- a/qcsrc/server/bot/default/havocbot/havocbot.qc +++ b/qcsrc/server/bot/default/havocbot/havocbot.qc @@ -782,9 +782,9 @@ void havocbot_movetogoal(entity this) } // if bot for some reason doesn't get close to the current goal find another one - float curr_dist = vlen(this.origin - this.goalcurrent.origin); - if(!IS_PLAYER(this.goalcurrent)) + if(!IS_PLAYER(this.goalcurrent) && !(this.goalcurrent.bot_pickup_respawning && this.goalcurrent_distance < 50)) { + float curr_dist = vlen(this.origin - this.goalcurrent.origin); if(this.goalcurrent != this.goalcurrent_prev) { this.goalcurrent_prev = this.goalcurrent;