Author: sveinung
Date: Tue Dec 22 15:52:03 2015
New Revision: 31153

URL: http://svn.gna.org/viewcvs/freeciv?rev=31153&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:
    branches/S2_6/server/unittools.c

Modified: branches/S2_6/server/unittools.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/server/unittools.c?rev=31153&r1=31152&r2=31153&view=diff
==============================================================================
--- branches/S2_6/server/unittools.c    (original)
+++ branches/S2_6/server/unittools.c    Tue Dec 22 15:52:03 2015
@@ -4110,7 +4110,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