]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Require at least half bot's body is inside teleport waypoint before heading to telepo...
authorterencehill <piuntn@gmail.com>
Mon, 7 Aug 2017 13:00:52 +0000 (15:00 +0200)
committerterencehill <piuntn@gmail.com>
Wed, 9 Aug 2017 14:30:25 +0000 (16:30 +0200)
qcsrc/server/bot/default/havocbot/havocbot.qc

index dde996d19c5b9f0f36c98a7402da010bb1b0515a..e98bd117c9a9fa9222f736a47ea9fd8837ac3524 100644 (file)
@@ -766,7 +766,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(this.goalcurrent.wpisbox && boxesoverlap(this.goalcurrent.absmin, this.goalcurrent.absmax, this.absmin, this.absmax))
+       if(this.goalcurrent.wpisbox && boxesoverlap(this.goalcurrent.absmin, this.goalcurrent.absmax, this.origin + eZ * this.mins.z, this.origin + eZ * this.maxs.z))
        {
                bunnyhop_forbidden = true;
                destorg = this.goalcurrent.origin;