Author: cazfi
Date: Mon Jan 30 11:11:00 2017
New Revision: 34911

URL: http://svn.gna.org/viewcvs/freeciv?rev=34911&view=rev
Log:
Always lookup unit orders related keys when loading a savegame.

Reported by Christian Knoke <chrisk>

See bug #25405

Modified:
    branches/S3_0/server/savegame2.c
    branches/S3_0/server/savegame3.c

Modified: branches/S3_0/server/savegame2.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S3_0/server/savegame2.c?rev=34911&r1=34910&r2=34911&view=diff
==============================================================================
--- branches/S3_0/server/savegame2.c    (original)
+++ branches/S3_0/server/savegame2.c    Mon Jan 30 11:11:00 2017
@@ -4275,6 +4275,14 @@
     } else {
       punit->has_orders = FALSE;
       punit->orders.list = NULL;
+
+      (void) secfile_entry_lookup(loading->file, "%s.orders_index", unitstr);
+      (void) secfile_entry_lookup(loading->file, "%s.orders_repeat", unitstr);
+      (void) secfile_entry_lookup(loading->file, "%s.orders_vigilant", 
unitstr);
+      (void) secfile_entry_lookup(loading->file, "%s.orders_list", unitstr);
+      (void) secfile_entry_lookup(loading->file, "%s.dir_list", unitstr);
+      (void) secfile_entry_lookup(loading->file, "%s.activity_list", unitstr);
+      (void) secfile_entry_lookup(loading->file, "%s.tgt_list", unitstr);
     }
   }
 

Modified: branches/S3_0/server/savegame3.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S3_0/server/savegame3.c?rev=34911&r1=34910&r2=34911&view=diff
==============================================================================
--- branches/S3_0/server/savegame3.c    (original)
+++ branches/S3_0/server/savegame3.c    Mon Jan 30 11:11:00 2017
@@ -5552,6 +5552,14 @@
     } else {
       punit->has_orders = FALSE;
       punit->orders.list = NULL;
+
+      (void) secfile_entry_lookup(loading->file, "%s.orders_index", unitstr);
+      (void) secfile_entry_lookup(loading->file, "%s.orders_repeat", unitstr);
+      (void) secfile_entry_lookup(loading->file, "%s.orders_vigilant", 
unitstr);
+      (void) secfile_entry_lookup(loading->file, "%s.orders_list", unitstr);
+      (void) secfile_entry_lookup(loading->file, "%s.dir_list", unitstr);
+      (void) secfile_entry_lookup(loading->file, "%s.activity_list", unitstr);
+      (void) secfile_entry_lookup(loading->file, "%s.tgt_list", unitstr);
     }
   }
 


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

Reply via email to