]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Bot AI: avoid clearing twice the route to the goal when bot reaches an item
authorterencehill <piuntn@gmail.com>
Thu, 7 Sep 2017 22:32:38 +0000 (00:32 +0200)
committerterencehill <piuntn@gmail.com>
Thu, 7 Sep 2017 22:32:38 +0000 (00:32 +0200)
qcsrc/server/bot/default/havocbot/havocbot.qc

index 0c47f608b04a4258414df82b419ab2c0dba09854..2f1f183cfc1fac016d33bcf96a2195680eedfda2 100644 (file)
@@ -747,7 +747,7 @@ void havocbot_movetogoal(entity this)
                        else if(this.goalentity == this.goalcurrent)
                                locked_goal = true; // wait for item to respawn
                }
-               else if(!this.goalentity.solid)
+               else if(!this.goalentity.solid && !boxesoverlap(this.goalentity.absmin, this.goalentity.absmax, this.absmin, this.absmax))
                {
                        if(checkpvs(this.origin, this.goalentity))
                        {