while (!path->near_point->unity && path->near_point != path->tail)
path->near_point++;
-/* Initialize next_way. */
-if (path->wtail == path->whead - 1 || (_autopath_data.enabled && path->wtail == path->whead))
- path->next_way = NULL;
+/* Initialize next_way */
+if (path->wtail==path->whead)
+ path->next_way=NULL;
else
- /* We have at least one waypoint. */
- path->next_way = (_autoroute_data.enabled ? path->whead + 1 : path->whead);
+ path->next_way=path->whead;
+path->next_way_dist_squared=-1;
-path->next_way_dist_squared = -1;
-
-/* Initialize _next_wpt. */
-path->next_wpt = NULL;
-path->next_wpt_dist_squared = -1;
+/* Initialize next_wpt */
+path->next_wpt=NULL;
+path->next_wpt_dist_squared=-1;
}