Author: sveinung
Date: Fri Feb 13 13:15:03 2015
New Revision: 28122

URL: http://svn.gna.org/viewcvs/freeciv?rev=28122&view=rev
Log:
Explain when a unit can't act because it isn't TransportDependent

See patch #5812

Modified:
    branches/S2_6/server/unithand.c

Modified: branches/S2_6/server/unithand.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/server/unithand.c?rev=28122&r1=28121&r2=28122&view=diff
==============================================================================
--- branches/S2_6/server/unithand.c     (original)
+++ branches/S2_6/server/unithand.c     Fri Feb 13 13:15:03 2015
@@ -464,9 +464,12 @@
   struct player *pplayer = unit_owner(punit);
   struct player *must_war_player;
 
-  if (!can_unit_exist_at_tile(punit, unit_tile(punit))
-      && !can_unit_act_when_ustate_is(unit_type(punit),
-                                      USP_TRANSP_DEP, TRUE)) {
+  if ((!can_unit_exist_at_tile(punit, unit_tile(punit))
+       && !can_unit_act_when_ustate_is(unit_type(punit),
+                                       USP_TRANSP_DEP, TRUE))
+      || (can_unit_exist_at_tile(punit, unit_tile(punit))
+          && !can_unit_act_when_ustate_is(unit_type(punit),
+                                          USP_TRANSP_DEP, FALSE))) {
     /* Explaination: bad terrain. */
 
     struct terrain *pterrain = tile_terrain(unit_tile(punit));


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

Reply via email to