From: terencehill Date: Mon, 11 Dec 2017 23:18:46 +0000 (+0100) Subject: Bot AI: properly update goal when the item bot is moving to gets attached to a player... X-Git-Tag: xonotic-v0.8.5~2378^2~8 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=987569ab4235025ad7efe3817b2b049d4fda7b5a;p=xonotic%2Fxonotic-data.pk3dir.git Bot AI: properly update goal when the item bot is moving to gets attached to a player (e.g. CTF flag) --- diff --git a/qcsrc/server/bot/default/havocbot/havocbot.qc b/qcsrc/server/bot/default/havocbot/havocbot.qc index fcf539f56..a125538cd 100644 --- a/qcsrc/server/bot/default/havocbot/havocbot.qc +++ b/qcsrc/server/bot/default/havocbot/havocbot.qc @@ -732,12 +732,17 @@ void havocbot_movetogoal(entity this) bool locked_goal = false; - if(this.goalentity && wasfreed(this.goalentity)) + if((this.goalentity && wasfreed(this.goalentity)) + || (this.goalcurrent == this.goalentity && this.goalentity.tag_entity)) { navigation_clearroute(this); navigation_goalrating_timeout_force(this); return; } + else if(this.goalentity.tag_entity) + { + navigation_goalrating_timeout_expire(this, 2); + } else if(this.goalentity.bot_pickup) { if(this.goalentity.bot_pickup_respawning)