[Freeciv-Dev] Re: Waypoints for path-finding
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Mon, 31 Mar 2003, Raimar Falke wrote:
> I want to convert the client goto (remove client/goto.c). It was
> decided that I should preserve the waypoints-feature. So we have to
> add waypoint support to the path finding. Suggested interface:
>
> struct pf_path *pft_get_path(const struct pf_parameter *const parameter,
> int end_x, int end_y,
> int num_waypoints,
> struct map_position *waypoints);
>
> Reasons: a naive implementation creates a new map for every part
> (start-1st waypoint, 1st-2nd,...) and assembles the paths together at
> the end. I think this may be done without internal knowledge and so
> can be placed in pft.
Mmm, now that a little bird told me that I am expected to write this
function, I started looking for excuses and found them!
This function will be no use in client because of how the waypoints work
now (and it's certainly nice and should stay this way): you add waypoints
"dynamically", the map is recalculated each time you hit "g" and then the
little white path is displayed from the position of your last waypoint to
where your mouse is.
Try it, you'll see.
G.
P.S. PR#2768 should really be addressed!
|
|