Author: cazfi Date: Sun May 15 09:16:05 2016 New Revision: 32714 URL: http://svn.gna.org/viewcvs/freeciv?rev=32714&view=rev Log: When borders change owners and border vision is controlled by effects, adjust vision of the one losing the borders based on his/her own effect value.
See bug #24313 Modified: trunk/server/maphand.c Modified: trunk/server/maphand.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/server/maphand.c?rev=32714&r1=32713&r2=32714&view=diff ============================================================================== --- trunk/server/maphand.c (original) +++ trunk/server/maphand.c Sun May 15 09:16:05 2016 @@ -1913,21 +1913,22 @@ { struct player *ploser = tile_owner(ptile); - if (BORDERS_SEE_INSIDE == game.info.borders - || BORDERS_EXPAND == game.info.borders - || (powner && powner->server.border_vision)) { - if (ploser != powner) { - if (ploser) { - const v_radius_t radius_sq = V_RADIUS(-1, 0); - - shared_vision_change_seen(ploser, ptile, radius_sq, FALSE); - } - if (powner) { - const v_radius_t radius_sq = V_RADIUS(1, 0); - - shared_vision_change_seen(powner, ptile, radius_sq, TRUE); - } - } + if ((ploser != powner && ploser != NULL) + && (BORDERS_SEE_INSIDE == game.info.borders + || BORDERS_EXPAND == game.info.borders + || ploser->server.border_vision)) { + const v_radius_t radius_sq = V_RADIUS(-1, 0); + + shared_vision_change_seen(ploser, ptile, radius_sq, FALSE); + } + + if (powner != NULL + && (BORDERS_SEE_INSIDE == game.info.borders + || BORDERS_EXPAND == game.info.borders + || powner->server.border_vision)) { + const v_radius_t radius_sq = V_RADIUS(1, 0); + + shared_vision_change_seen(powner, ptile, radius_sq, TRUE); } tile_set_owner(ptile, powner, psource); _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits