]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Bot AI: properly update goal when the item bot is moving to gets attached to a player...
authorterencehill <piuntn@gmail.com>
Mon, 11 Dec 2017 23:18:46 +0000 (00:18 +0100)
committerterencehill <piuntn@gmail.com>
Mon, 11 Dec 2017 23:18:46 +0000 (00:18 +0100)
qcsrc/server/bot/default/havocbot/havocbot.qc

index fcf539f568648574c13394bdb1d5f811ecbd7b24..a125538cdd58705a0651a90a9e42873154b84fc4 100644 (file)
@@ -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)