Author: sveinung
Date: Sun Jan  4 09:58:13 2015
New Revision: 27503

URL: http://svn.gna.org/viewcvs/freeciv?rev=27503&view=rev
Log:
Clean up: Place regular move handling after the enabler controlled actions.

Move isn't action enabler controlled (yet). Move it to the end of the switch
statement in handle_unit_do_action() so it won't be in the middle of enabler
controlled actions.

See patch #5643

Modified:
    trunk/server/unithand.c

Modified: trunk/server/unithand.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/server/unithand.c?rev=27503&r1=27502&r2=27503&view=diff
==============================================================================
--- trunk/server/unithand.c     (original)
+++ trunk/server/unithand.c     Sun Jan  4 09:58:13 2015
@@ -776,12 +776,6 @@
       }
     }
     break;
-  case ACTION_MOVE:
-    if (target_tile
-        && may_non_act_move(actor_unit, pcity, target_tile, FALSE)) {
-      (void) unit_move_handling(actor_unit, target_tile, FALSE, TRUE);
-    }
-    break;
   case ACTION_SPY_STEAL_TECH:
     if (pcity) {
       if (is_action_enabled_unit_on_city(action_type,
@@ -864,6 +858,12 @@
         illegal_action(pplayer, actor_unit, action_type,
                        city_owner(pcity));
       }
+    }
+    break;
+  case ACTION_MOVE:
+    if (target_tile
+        && may_non_act_move(actor_unit, pcity, target_tile, FALSE)) {
+      (void) unit_move_handling(actor_unit, target_tile, FALSE, TRUE);
     }
     break;
   }


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

Reply via email to