Author: sveinung Date: Thu Oct 13 12:12:39 2016 New Revision: 34115 URL: http://svn.gna.org/viewcvs/freeciv?rev=34115&view=rev Log: Explanation: "Conquer City" is city targeted.
Check the target city's tile rather than a potentially missing target tile when trying to explain why the "Conquer City" action was illegal. Reported by Andreas Røsdal <andreasr> See bug #25170 Modified: trunk/server/unithand.c Modified: trunk/server/unithand.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/server/unithand.c?rev=34115&r1=34114&r2=34115&view=diff ============================================================================== --- trunk/server/unithand.c (original) +++ trunk/server/unithand.c Thu Oct 13 12:12:39 2016 @@ -865,9 +865,14 @@ action_custom = unit_attack_units_at_tile_result(punit, target_tile); break; case ACTION_CONQUER_CITY: - action_custom = unit_move_to_tile_test(punit, punit->activity, - unit_tile(punit), target_tile, - FALSE, NULL, TRUE); + if (target_city) { + action_custom = unit_move_to_tile_test(punit, punit->activity, + unit_tile(punit), + city_tile(target_city), + FALSE, NULL, TRUE); + } else { + action_custom = MR_OK; + } break; default: action_custom = 0; _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits