From: Kaj-Michael Lang Date: Thu, 22 May 2008 07:15:52 +0000 (+0300) Subject: Path: Misc X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7ac595839a694f953d38712e44e307c00dbd8370;p=mapper Path: Misc --- diff --git a/src/path.c b/src/path.c index 0be31a2..c833aba 100644 --- a/src/path.c +++ b/src/path.c @@ -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; }