[Freeciv-Dev] Re: [Patch] Reduce superfluous tile_info packets version 2
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Raimar Falke wrote:
>
> Ok here the cleaned up patch for official submission. This patch does:
> - removes the sent field of struct tile (AFAI see this was intended
> to solve a similar problem and it now obsolete)
> - adds a new server-only bit vector in struct tile: changed
> - if the server tries to sent a tile_info packet it is checked if
> this tile has changed since last sent for this player
> - if ther server has sent a tile_info packet the corresponding bit in
> the changed field is cleared
> - settler.c changes the special field calculates some stuff and
> reverts these changes. Such changes aren't user/client visible and
> have from now on to be done with the base_* methods.
Everything looks OK. However:
- In savegame.c when the terrain is loaded from the savegame, an initial
glance would make one think that map_set_terrain should be used here instead
of manually setting the terrain and marking the tile as changed. Of course,
this would not work - a comment to this effect would be nice IMO.
- It is difficult to verify that you've picked up every place that changes
the tile information. Thus although the patch itself looks good, it is
difficult to verify that it is complete/correct. I'll take a deeper look at
this later today.
jason
|
|