// 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;
{
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;
}