]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix destination point of a tracewalk call
authorterencehill <piuntn@gmail.com>
Mon, 11 Sep 2017 15:11:20 +0000 (17:11 +0200)
committerterencehill <piuntn@gmail.com>
Mon, 11 Sep 2017 15:11:20 +0000 (17:11 +0200)
qcsrc/server/bot/default/navigation.qc

index 64e960ff760f975a3ac36a9c7204ac6648978a82..86f2feebdf718b4c36e4fcb0d578ebb8279fe4f9 100644 (file)
@@ -1306,7 +1306,7 @@ bool navigation_routetogoal(entity this, entity e, vector startposition)
                {
                        if (this.goalentity.navigation_dynamicgoal || autocvar_g_waypointeditor)
                        {
-                               SET_TRACEWALK_DESTCOORDS(e, nearest_wp.enemy.origin, dest, dest_height);
+                               SET_TRACEWALK_DESTCOORDS(this.goalentity, nearest_wp.enemy.origin, dest, dest_height);
                                if(vdist(dest - nearest_wp.enemy.origin, <, 1050))
                                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;