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

URL: http://svn.gna.org/viewcvs/freeciv?rev=31151&view=rev
Log:
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
target.

See bug #24215

Modified:
    trunk/server/unittools.c

Modified: trunk/server/unittools.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/server/unittools.c?rev=31151&r1=31150&r2=31151&view=diff
==============================================================================
--- 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
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to