Author: sveinung Date: Sun Aug 9 00:48:52 2015 New Revision: 29409 URL: http://svn.gna.org/viewcvs/freeciv?rev=29409&view=rev Log: Try to save untransferable unique game loss units
See bug #23691 Modified: trunk/server/citytools.c Modified: trunk/server/citytools.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/server/citytools.c?rev=29409&r1=29408&r2=29409&view=diff ============================================================================== --- trunk/server/citytools.c (original) +++ trunk/server/citytools.c Sun Aug 9 00:48:52 2015 @@ -612,18 +612,23 @@ unit_rule_name(punit), nation_rule_name(nation_of_player(from_player))); - if (verbose) { - notify_player(from_player, unit_tile(punit), - E_UNIT_LOST_MISC, ftc_server, - /* TRANS: Americans ... Leader */ - _("The %s already have a %s. Can't transfer yours."), - nation_plural_for_player(to_player), - unit_tile_link(punit)); - } - - /* TODO: What should be done when the unit is a game loss unit? Maybe - * it should be bounced rather than killed? */ - wipe_unit(punit, ULR_CITY_LOST, NULL); + if (utype_has_flag(unit_type(punit), UTYF_GAMELOSS)) { + /* Try to save game loss units. */ + bounce_unit(punit, verbose); + } else { + /* Kill the unique unit. */ + + if (verbose) { + notify_player(from_player, unit_tile(punit), + E_UNIT_LOST_MISC, ftc_server, + /* TRANS: Americans ... Leader */ + _("The %s already have a %s. Can't transfer yours."), + nation_plural_for_player(to_player), + unit_tile_link(punit)); + } + + wipe_unit(punit, ULR_CITY_LOST, NULL); + } return; } _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits