Author: sveinung
Date: Tue Mar  8 15:08:40 2016
New Revision: 32196

URL: http://svn.gna.org/viewcvs/freeciv?rev=32196&view=rev
Log:
Forbid airlift to city where unit can't exist.

See bug #24504

Modified:
    trunk/common/unit.c
    trunk/doc/README.actions

Modified: trunk/common/unit.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/unit.c?rev=32196&r1=32195&r2=32196&view=diff
==============================================================================
--- trunk/common/unit.c (original)
+++ trunk/common/unit.c Tue Mar  8 15:08:40 2016
@@ -92,6 +92,15 @@
 
   if (psrc_city == pdest_city) {
     /* Airlifting to our current position doesn't make sense. */
+    return AR_BAD_DST_CITY;
+  }
+
+  if (pdest_city
+      && (NULL == restriction
+          || (tile_get_known(city_tile(pdest_city), restriction)
+              == TILE_KNOWN_SEEN))
+      && !can_unit_exist_at_tile(punit, city_tile(pdest_city))) {
+    /* Can't exist at the destination tile. */
     return AR_BAD_DST_CITY;
   }
 

Modified: trunk/doc/README.actions
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/doc/README.actions?rev=32196&r1=32195&r2=32196&view=diff
==============================================================================
--- trunk/doc/README.actions    (original)
+++ trunk/doc/README.actions    Tue Mar  8 15:08:40 2016
@@ -269,6 +269,7 @@
  * the actor unit must have movement left
  * the actor unit isn't transporting another unit
  * the actor unit isn't inside the target city
+ * the actor unit can exist in the target city (outside a transport)
  * the actor unit is in a city
    - that is domestic or, if airliftingstyle permits it, allied
    - that has Airlift (see the Airlift effect and the airliftingstyle


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

Reply via email to