[Freeciv-Dev] (PR#11453) first city has all corruption
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=11453 >
- Start a game.
- Found a city.
- Look at the city: it has 100% corruption.
- Click a worker tile. Workers are moved and corruption is fixed.
The problem is that generic_city_refresh is called when the city is
first sent, and for some reason this first generic_city_refresh doesn't
know where the palace is. So it assigns a distance of 36 which causes
very high corruption.
This is fixed by the patch in PR#11415, so if we use that patch (which
we should) this can be closed.
The city knows there's a palace in it but find_palace() doesn't find it.
This is because the city isn't added to the player's city list until
right after the refresh is called. This patch fixes this.
-jason
Index: client/packhand.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/packhand.c,v
retrieving revision 1.442
diff -u -r1.442 packhand.c
--- client/packhand.c 9 Dec 2004 18:29:58 -0000 1.442
+++ client/packhand.c 10 Dec 2004 16:34:24 -0000
@@ -578,10 +578,6 @@
{
int i;
- if (city_owner(pcity) == game.player_ptr) {
- generic_city_refresh(pcity, FALSE, 0);
- }
-
if(is_new) {
unit_list_init(&pcity->units_supported);
unit_list_init(&pcity->info_units_supported);
@@ -603,6 +599,10 @@
}
}
+ if (city_owner(pcity) == game.player_ptr) {
+ generic_city_refresh(pcity, FALSE, 0);
+ }
+
if ((draw_map_grid || draw_borders) && can_client_change_view()) {
/* We have to make sure we update any workers on the map grid, then
* redraw the city descriptions on top of them. So we calculate the
- [Freeciv-Dev] (PR#11453) first city has all corruption,
Jason Short <=
|
|