Author: cazfi Date: Thu Mar 5 19:55:52 2015 New Revision: 28416 URL: http://svn.gna.org/viewcvs/freeciv?rev=28416&view=rev Log: Do not sent virtual tiles to players when autosettlers are evaluating extra removal with them.
See bug #23286 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=28416&r1=28415&r2=28416&view=diff ============================================================================== --- branches/S2_6/server/maphand.c (original) +++ branches/S2_6/server/maphand.c Thu Mar 5 19:55:52 2015 @@ -2218,14 +2218,17 @@ void destroy_extra(struct tile *ptile, struct extra_type *pextra) { bv_player base_seen; - - /* Remember what play was able to see the base. */ - BV_CLR_ALL(base_seen); - players_iterate(pplayer) { - if (map_is_known_and_seen(ptile, pplayer, V_MAIN)) { - BV_SET(base_seen, player_index(pplayer)); - } - } players_iterate_end; + bool virtual = tile_virtual_check(ptile); + + /* Remember what players were able to see the base. */ + if (!virtual) { + BV_CLR_ALL(base_seen); + players_iterate(pplayer) { + if (map_is_known_and_seen(ptile, pplayer, V_MAIN)) { + BV_SET(base_seen, player_index(pplayer)); + } + } players_iterate_end; + } if (is_extra_caused_by(pextra, EC_BASE)) { struct base_type *pbase = extra_base_get(pextra); @@ -2250,13 +2253,15 @@ tile_remove_extra(ptile, pextra); - /* Remove base from vision of players which were able to see the base. */ - players_iterate(pplayer) { - if (BV_ISSET(base_seen, player_index(pplayer)) - && update_player_tile_knowledge(pplayer, ptile)) { - send_tile_info(pplayer->connections, ptile, FALSE); - } - } players_iterate_end; + if (!virtual) { + /* Remove base from vision of players which were able to see the base. */ + players_iterate(pplayer) { + if (BV_ISSET(base_seen, player_index(pplayer)) + && update_player_tile_knowledge(pplayer, ptile)) { + send_tile_info(pplayer->connections, ptile, FALSE); + } + } players_iterate_end; + } } /**************************************************************************** _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits