Le lundi 30 novembre 2009 à 21:52 +0100, Andreas Røsdal a écrit :
> Hi,
> What would the easiest way to implement server-side goto be?
> I don't want to implement client-side goto for my web client,
> so therefore it would be very useful for the client to request
> that the server moves a unit to a specified tile.

The server-side goto already exists (see server/gotohand.[ch]).
However, it's a very old code which doesn't fit totally the current move
rules. A better approch would be to use the path finding code, like in
client side, which is available in the common part (see documentation in
common/path_finding.[ch] and common/pf_tools.[ch]). This code gives you
a path from a tile to another, so it would need to be converted to unit
orders somewhere, like in classic server handle function.

I hope I have been clear.  If you have some assertions, maybe I should
add some lines in the documentation in common/path_finding.h.


Freeciv-dev mailing list

Reply via email to