]> err.no Git - mapper/commitdiff
Path: Misc
authorKaj-Michael Lang <milang@tal.org>
Thu, 22 May 2008 07:15:52 +0000 (10:15 +0300)
committerKaj-Michael Lang <milang@tal.org>
Thu, 22 May 2008 07:15:52 +0000 (10:15 +0300)
src/path.c

index 0be31a2149c642143da1ada0fbefe5a42b388b1c..c833abab462a92a869d1f9c650b6fe92563688d8 100644 (file)
@@ -429,18 +429,16 @@ path->near_point=path->head;
 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;
 
 }