From: terencehill Date: Wed, 16 Aug 2017 11:54:34 +0000 (+0200) Subject: Fix start position of 2 SET_TRACEWALK_DESTCOORDS calls X-Git-Tag: xonotic-v0.8.5~2378^2~84 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=a5ce7c7b72d2a9d32bc32f914409a15a728e5764;p=xonotic%2Fxonotic-data.pk3dir.git Fix start position of 2 SET_TRACEWALK_DESTCOORDS calls --- 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; }