]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix detection of extended teleport waypoints where bot can get stuck
authorterencehill <piuntn@gmail.com>
Fri, 28 Jul 2017 14:06:39 +0000 (16:06 +0200)
committerterencehill <piuntn@gmail.com>
Fri, 28 Jul 2017 14:06:39 +0000 (16:06 +0200)
qcsrc/server/bot/default/havocbot/havocbot.qc

index 68c3d6966e46c2f06724cb4253af72661c04730c..7fba48eabbff5e352d8b33db91412048342c8691 100644 (file)
@@ -755,7 +755,7 @@ void havocbot_movetogoal(entity this)
 
        // in case bot ends up inside the teleport waypoint without touching
        // the teleport itself, head to the teleport origin
-       if(destorg == this.origin)
+       if(this.goalcurrent.wpisbox && boxesoverlap(this.goalcurrent.absmin, this.goalcurrent.absmax, this.origin, this.origin))
                destorg = this.goalcurrent.origin;
 
        diff = destorg - this.origin;