]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix start position of 2 SET_TRACEWALK_DESTCOORDS calls
authorterencehill <piuntn@gmail.com>
Wed, 16 Aug 2017 11:54:34 +0000 (13:54 +0200)
committerterencehill <piuntn@gmail.com>
Wed, 16 Aug 2017 11:54:34 +0000 (13:54 +0200)
qcsrc/server/bot/default/navigation.qc

index 94c6fa65f581a6d071cb6e1a0811857e194bc261..2826aed9ea1e436b65a86c8a5d372af27528a99e 100644 (file)
@@ -1272,7 +1272,7 @@ bool navigation_routetogoal(entity this, entity e, vector startposition)
        // if it can reach the goal there is nothing more to do
        vector dest;
        float dest_height;
-       SET_TRACEWALK_DESTCOORDS(e, e.origin, dest, dest_height);
+       SET_TRACEWALK_DESTCOORDS(e, startposition, dest, dest_height);
        if (tracewalk(this, startposition, STAT(PL_MIN, this), STAT(PL_MAX, this), dest, dest_height, bot_navigation_movemode))
                return true;
 
@@ -1300,7 +1300,7 @@ bool navigation_routetogoal(entity this, entity e, vector startposition)
                {
                        if (this.goalentity.navigation_dynamicgoal || autocvar_g_waypointeditor)
                        {
-                               SET_TRACEWALK_DESTCOORDS(e, e.origin, dest, dest_height);
+                               SET_TRACEWALK_DESTCOORDS(e, nearest_wp.enemy.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))
                                        e = nearest_wp.enemy;
                        }