Author: pepeto Date: Mon Jan 26 11:44:03 2015 New Revision: 27856 URL: http://svn.gna.org/viewcvs/freeciv?rev=27856&view=rev Log: Remove buoys from owner player knowledge when they get destroyed.
See gna bug #22863 Modified: branches/S2_4/server/maphand.c Modified: branches/S2_4/server/maphand.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_4/server/maphand.c?rev=27856&r1=27855&r2=27856&view=diff ============================================================================== --- branches/S2_4/server/maphand.c (original) +++ branches/S2_4/server/maphand.c Mon Jan 26 11:44:03 2015 @@ -2007,6 +2007,16 @@ ****************************************************************************/ void destroy_base(struct tile *ptile, struct base_type *pbase) { + 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; + if (territory_claiming_base(pbase)) { /* Clearing borders will take care of the vision providing * bases as well. */ @@ -2027,4 +2037,12 @@ } } tile_remove_base(ptile, pbase); -} + + /* 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