Author: cazfi Date: Sun Oct 2 08:00:15 2016 New Revision: 33960 URL: http://svn.gna.org/viewcvs/freeciv?rev=33960&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_5/server/unithand.c Modified: branches/S2_5/server/unithand.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/server/unithand.c?rev=33960&r1=33959&r2=33960&view=diff ============================================================================== --- branches/S2_5/server/unithand.c (original) +++ branches/S2_5/server/unithand.c Sun Oct 2 08:00:15 2016 @@ -500,23 +500,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_has_type_flag(punit, UTYF_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 (unit_can_help_build_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