Author: sveinung
Date: Mon Aug 10 16:06:32 2015
New Revision: 29438

URL: http://svn.gna.org/viewcvs/freeciv?rev=29438&view=rev
Log:
Try to save an untransferable game loss unit

See bug #23691

Modified:
    branches/S2_5/server/citytools.c

Modified: branches/S2_5/server/citytools.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/server/citytools.c?rev=29438&r1=29437&r2=29438&view=diff
==============================================================================
--- branches/S2_5/server/citytools.c    (original)
+++ branches/S2_5/server/citytools.c    Mon Aug 10 16:06:32 2015
@@ -610,9 +610,14 @@
                 unit_rule_name(punit),
                 nation_rule_name(nation_of_player(from_player)));
 
-      /* 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. */
+
+        wipe_unit(punit, ULR_CITY_LOST, NULL);
+      }
 
       return;
     }


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to