Author: cazfi Date: Thu Aug 18 07:37:57 2016 New Revision: 33639 URL: http://svn.gna.org/viewcvs/freeciv?rev=33639&view=rev Log: Make sure illegal border claims are cleared after a tile has transformed from land to ocean.
See bug #23179 Modified: branches/S2_6/server/maphand.c Modified: branches/S2_6/server/maphand.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/server/maphand.c?rev=33639&r1=33638&r2=33639&view=diff ============================================================================== --- branches/S2_6/server/maphand.c (original) +++ branches/S2_6/server/maphand.c Thu Aug 18 07:37:57 2016 @@ -81,6 +81,9 @@ static inline int map_get_own_seen(const struct player *pplayer, const struct tile *ptile, enum vision_layer vlayer); + +static bool is_claimable_ocean(struct tile *ptile, struct tile *source, + struct player *pplayer); /************************************************************************** Used only in global_warming() and nuclear_winter() below. @@ -1748,6 +1751,7 @@ void check_terrain_change(struct tile *ptile, struct terrain *oldter) { struct terrain *newter = tile_terrain(ptile); + struct tile *claimer; /* Check if new terrain is a freshwater terrain next to non-freshwater. * In that case, the new terrain is *changed*. */ @@ -1795,6 +1799,13 @@ if (need_to_reassign_continents(oldter, newter)) { assign_continent_numbers(); send_all_known_tiles(NULL); + } + + claimer = tile_claimer(ptile); + if (claimer != NULL && is_ocean_tile(ptile)) { + if (!is_claimable_ocean(ptile, claimer, tile_owner(ptile))) { + map_clear_border(ptile); + } } sanity_check_tile(ptile); _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits