[Freeciv-Dev] Re: Waypoints for path-finding
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Tue, Apr 01, 2003 at 02:03:32PM +0100, Gregory Berkolaiko wrote:
> > > After k-th waypoint is specified, the paths
> > > waypoint[0] -> waypoint[1] -> ... -> waypoint[k]
> > > are all fixed. There is no need to recompute them. All user is
> > > interested
> > > in is the path
> > > waypoint[k] -> mouse_location,
> > > which can be obtained by calling
> > > parameter.x = waypoint[k].x
> > > parameter.y = waypoint[k].y
> > > /* The rest of parameter remains the same */
> > > map = pf_create_map(parameter)
> > > path = pf_get_path(map, mouse.x, mouse.y)
> > > draw_segment(path)
> >
> > Yes but this way the client code needs to assembles all parts if this path
> > is sent to the server. And I think this should be done by some pf(t) code.
>
> Assembling segments is one thing, recalculating several segments when only
> one is changed is another.
>
> Will
> pft_extend_path(path, new_segment)
> be enough?
AFAIK we need this only for the server sending. So we need an
path pft_merge_paths(list of paths)
Raimar
|
|