Author: cazfi
Date: Thu Apr 14 18:49:34 2016
New Revision: 32400

URL: http://svn.gna.org/viewcvs/freeciv?rev=32400&view=rev
Log:
Do not fail an assert on client side when it remembers previously existing city 
in a fogged tile and
server sends updates about that tile, when it's seen again, so that terrain is 
first changed to one
that can't have city on it, and only then the city removal.

See bug #24562

Modified:
    branches/S2_5/common/tile.c

Modified: branches/S2_5/common/tile.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/common/tile.c?rev=32400&r1=32399&r2=32400&view=diff
==============================================================================
--- branches/S2_5/common/tile.c (original)
+++ branches/S2_5/common/tile.c Thu Apr 14 18:49:34 2016
@@ -125,11 +125,14 @@
    * - pterrain is NULL (= unknown terrain)
    * - ptile is a virtual tile
    * - pterrain does not has the flag TER_NO_CITIES
-   * - there is no city on ptile.
+   * - there is no city on ptile
+   * - client may have had tile fogged and is receiving terrain change before
+   *   city removal
    * This should be read as: The terrain change is INVALID if a terrain with
    * the flag TER_NO_CITIES is given for a real tile with a city (i.e. all
    * check evaluate to TRUE). */
   fc_assert_msg(NULL == pterrain
+                || !is_server()
                 || tile_virtual_check(ptile)
                 || !terrain_has_flag(pterrain, TER_NO_CITIES)
                 || NULL == tile_city(ptile),


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to