[Freeciv-Dev] Re: Hut does not vanish (PR#574)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Wed, 27 Sep 2000,
Gerhard Killesreiter <killes@xxxxxxxxxxxxxxxxxxxxxx> wrote:
> if a unit gets placed on it at the beginning.
> You can not »discover« is later. The graphics stays there. If you load the
> savegame, the graphics is gone.
>
> CVS from 1st September.
> GTK-client
Thanks, a subtle bug which only occurs some of the time!
The reason you cannot discover the hut (and why it is not there
on re-load) is that the server has removed the hut (because of
placing the unit there), but omitted to tell the client that
the hut is no longer there.
Actually, normally the client _does_ get told, but if the client
has already been told about that tile before, due to a dispersed
unit placed nearby, it doesn't get updated when the hut is removed.
Eg, server settings to reproduce: (current CVS)
set huts 500
set dispersion 10
set explorer 10
set settlers 10
set seed 112
set randseed 112
set aifill 10
Patch to fix problem attached.
-- David
--- freeciv-cvs/server/gamehand.c Fri Sep 1 00:47:36 2000
+++ fc-adv/server/gamehand.c Sun Oct 8 12:53:26 2000
@@ -119,10 +119,14 @@
!is_non_allied_unit_tile(map_get_tile(dx, dy),
game.players[i].player_no)));
}
- /* For scenarios, huts may coincide with player starts;
- remove any such hut: */
+ /* For scenarios or dispersion, huts may coincide with player
+ starts (in other cases, huts are avoided as start positions).
+ Remove any such hut, and make sure to tell the client, since
+ we may have already sent this tile (with the hut) earlier:
+ */
if (map_get_special(dx, dy) & S_HUT) {
map_clear_special(dx, dy, S_HUT);
+ send_tile_info(NULL, dx, dy);
freelog(LOG_VERBOSE, "Removed hut on start position for %s",
game.players[i].name);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] Re: Hut does not vanish (PR#574),
David Pfitzner <=
|
|