Author: sveinung
Date: Sun Aug  2 01:04:55 2015
New Revision: 29291

URL: http://svn.gna.org/viewcvs/freeciv?rev=29291&view=rev
Log:
Require that a unit has population to add to do Join City

See patch #6156

Modified:
    trunk/common/actions.c

Modified: trunk/common/actions.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/actions.c?rev=29291&r1=29290&r2=29291&view=diff
==============================================================================
--- trunk/common/actions.c      (original)
+++ trunk/common/actions.c      Sun Aug  2 01:04:55 2015
@@ -624,6 +624,12 @@
       return FALSE;
     }
 
+    if (unit_pop_value(actor_unit) <= 0) {
+      /* Reason: Must have population to add. */
+      /* Info leak: The actor player knows the type of his unit. */
+      return FALSE;
+    }
+
     /* TODO: Move more individual requirements to the action enabler. */
     if (!unit_can_add_to_city(actor_unit)) {
       return FALSE;


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

Reply via email to