Author: sveinung
Date: Tue Dec 22 15:51:35 2015
New Revision: 31151

Fix move order action selection pop up.

The move order has been split in ORDER_MOVE and ORDER_ACTION_MOVE. A plain
non action move isn't supposed to cause a non move action to happen.

The order execution code would ignore ORDER_MOVE vs ORDER_ACTION_MOVE when
deciding if the action selection dialog should pop up or not. It would
decide based on the order position instead. The last order was able to pop
up the action selection dialog. An earlier order wasn't.

Make the order execution action selection dialog pop up decision depend on
the given order. An ORDER_MOVE given as the final order won't case the
action selection dialog to pop up. An ORDER_ACTION_MOVE in the middle of
the orders will pop up the action selection dialog if there is a suitable

See bug #24215


Modified: trunk/server/unittools.c
--- trunk/server/unittools.c    (original)
+++ trunk/server/unittools.c    Tue Dec 22 15:51:35 2015
@@ -4168,7 +4168,8 @@
       log_debug("  moving to %d,%d", TILE_XY(dst_tile));
-      res = unit_move_handling(punit, dst_tile, FALSE, !last_order);
+      res = unit_move_handling(punit, dst_tile, FALSE,
+                               order.order != ORDER_ACTION_MOVE);
       if (!player_unit_by_number(pplayer, unitid)) {
         log_debug("  unit died while moving.");
         /* A player notification should already have been sent. */

Freeciv-commits mailing list

Reply via email to