Author: sveinung
Date: Fri Nov 20 14:36:03 2015
New Revision: 30700

URL: http://svn.gna.org/viewcvs/freeciv?rev=30700&view=rev
Log:
save games: ORDER_ACTION_MOVE needs a direction

See bug #24097

Modified:
    trunk/server/savegame2.c
    trunk/server/savegame3.c

Modified: trunk/server/savegame2.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/server/savegame2.c?rev=30700&r1=30699&r2=30700&view=diff
==============================================================================
--- trunk/server/savegame2.c    (original)
+++ trunk/server/savegame2.c    Fri Nov 20 14:36:03 2015
@@ -4116,6 +4116,8 @@
 
         if (order->order == ORDER_LAST
             || (order->order == ORDER_MOVE && !direction8_is_valid(order->dir))
+            || (order->order == ORDER_ACTION_MOVE
+                && !direction8_is_valid(order->dir))
             || (order->order == ORDER_ACTIVITY
                 && order->activity == ACTIVITY_LAST)) {
           /* An invalid order. Just drop the orders for this unit. */

Modified: trunk/server/savegame3.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/server/savegame3.c?rev=30700&r1=30699&r2=30700&view=diff
==============================================================================
--- trunk/server/savegame3.c    (original)
+++ trunk/server/savegame3.c    Fri Nov 20 14:36:03 2015
@@ -5318,6 +5318,8 @@
 
         if (order->order == ORDER_LAST
             || (order->order == ORDER_MOVE && !direction8_is_valid(order->dir))
+            || (order->order == ORDER_ACTION_MOVE
+                && !direction8_is_valid(order->dir))
             || (order->order == ORDER_PERFORM_ACTION
                 && !action_id_is_valid(order->action))
             || (order->order == ORDER_ACTIVITY
@@ -5602,6 +5604,7 @@
         action_buf[j] = '?';
         switch (punit->orders.list[j].order) {
         case ORDER_MOVE:
+        case ORDER_ACTION_MOVE:
           dir_buf[j] = dir2char(punit->orders.list[j].dir);
           break;
         case ORDER_ACTIVITY:
@@ -5618,7 +5621,6 @@
           break;
         case ORDER_FULL_MP:
         case ORDER_HOMECITY:
-        case ORDER_ACTION_MOVE:
         case ORDER_OLD_DISBAND:
         case ORDER_OLD_BUILD_CITY:
         case ORDER_OLD_BUILD_WONDER:


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

Reply via email to