From a5ce7c7b72d2a9d32bc32f914409a15a728e5764 Mon Sep 17 00:00:00 2001 From: terencehill Date: Wed, 16 Aug 2017 13:54:34 +0200 Subject: [PATCH] Fix start position of 2 SET_TRACEWALK_DESTCOORDS calls --- qcsrc/server/bot/default/navigation.qc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qcsrc/server/bot/default/navigation.qc b/qcsrc/server/bot/default/navigation.qc index 94c6fa65f..2826aed9e 100644 --- a/qcsrc/server/bot/default/navigation.qc +++ b/qcsrc/server/bot/default/navigation.qc @@ -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; } -- 2.39.2