Author: cazfi Date: Sun Oct 2 08:00:08 2016 New Revision: 33959 URL: http://svn.gna.org/viewcvs/freeciv?rev=33959&view=rev Log: Do not try to make 'disband' act like 'help wonder' for caravans.
Reported by Sveinung Kvilhaugsvik <sveinung> See bug #23911 Modified: branches/S2_6/server/unithand.c Modified: branches/S2_6/server/unithand.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/server/unithand.c?rev=33959&r1=33958&r2=33959&view=diff ============================================================================== --- branches/S2_6/server/unithand.c (original) +++ branches/S2_6/server/unithand.c Sun Oct 2 08:00:08 2016 @@ -1615,24 +1615,11 @@ * Note: Nowadays it's possible to disband unit in allied city and * your ally receives those shields. Should it be like this? Why not? * That's why we must use city_owner instead of pplayer -- Zamar */ - - if (unit_can_do_action(punit, ACTION_HELP_WONDER)) { - /* Count this just like a caravan that was added to a wonder. - * However don't actually give the city the extra shields unless - * they are building a wonder (but switching to a wonder later in - * the turn will give the extra shields back). */ - pcity->caravan_shields += unit_build_shield_cost(punit); - if (is_action_enabled_unit_on_city(ACTION_HELP_WONDER, - punit, pcity)) { - pcity->shield_stock += unit_build_shield_cost(punit); - } else { - pcity->shield_stock += unit_disband_shields(punit); - } - } else { - pcity->shield_stock += unit_disband_shields(punit); - /* If we change production later at this turn. No penalty is added. */ - pcity->disbanded_shields += unit_disband_shields(punit); - } + int shields = unit_disband_shields(punit); + + pcity->shield_stock += shields; + /* If we change production later at this turn. No penalty is added. */ + pcity->disbanded_shields += shields; send_city_info(city_owner(pcity), pcity); } _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits