<URL: http://bugs.freeciv.org/Ticket/Display.html?id=39830 >

Per I. Mathisen wrote:
> If you are thinking about the distinction between server view of the
> world, and client views of the world (both contained within the
> server), then yes, these view may be radically different due to fog of
> war. However, borders operate only on the server view of the world,
> and does not touch client views at all (which may be kind of odd when
> you think about it, but it has to be this way, or things will become
> really strange when players meet and they try to figure out where
> their respective borders are).
And therein lies the rub.

I think I've figured out the problem, and it's partly to do with the
server giving out the vision information based on the server view.

The server "knows" the city isn't there anymore.  It expands the border,
but doesn't update the vision.  Probably, send_map_is_known_and_seen()
needs to return TRUE when the tile is owned by the player.  Easy enough.

Meanwhile, the server "knows" the client "knows" the city is there.  The
border code currently has (at least) two potentially conflicting values:

   struct player *owner;     /* Player owning this tile, or NULL. */
   struct tile *owner_source; /* what makes it owned by owner */

The latter isn't actually pointing to the source, it's pointing to the
tile of the source.  That tile no longer really has the source on it in
the server view, but has it in the client view!

Moreover, the savegame map_load should run map_calculate_borders().  Is
there a reason it was only done between turns?

Freeciv-dev mailing list

Reply via email to