]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Make bots skip last waypoint of a route (when possible) even while editing waypoints
authorterencehill <piuntn@gmail.com>
Wed, 16 Aug 2017 11:51:20 +0000 (13:51 +0200)
committerterencehill <piuntn@gmail.com>
Wed, 16 Aug 2017 11:51:20 +0000 (13:51 +0200)
qcsrc/server/bot/default/navigation.qc

index dac5e2c3bf9f2d37328663b6eea2eea1da2d3e15..94c6fa65f581a6d071cb6e1a0811857e194bc261 100644 (file)
@@ -1298,7 +1298,7 @@ bool navigation_routetogoal(entity this, entity e, vector startposition)
                        e = nearest_wp.enemy;
                else
                {
-                       if (this.goalentity.navigation_dynamicgoal)
+                       if (this.goalentity.navigation_dynamicgoal || autocvar_g_waypointeditor)
                        {
                                SET_TRACEWALK_DESTCOORDS(e, e.origin, dest, dest_height);
                                if(tracewalk(this, nearest_wp.enemy.origin, STAT(PL_MIN, this), STAT(PL_MAX, this), dest, dest_height, bot_navigation_movemode))