Author: cazfi Date: Thu Apr 14 18:49:23 2016 New Revision: 32398 URL: http://svn.gna.org/viewcvs/freeciv?rev=32398&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: trunk/common/tile.c Modified: trunk/common/tile.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/common/tile.c?rev=32398&r1=32397&r2=32398&view=diff ============================================================================== --- trunk/common/tile.c (original) +++ trunk/common/tile.c Thu Apr 14 18:49:23 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