Author: cazfi
Date: Sun Aug 16 21:11:14 2015
New Revision: 29562

URL: http://svn.gna.org/viewcvs/freeciv?rev=29562&view=rev
Log:
Add activites order vector in compat_load_020500() when loading pre-2.5 
savegame.

See patch #6237

Modified:
    trunk/server/savecompat.c

Modified: trunk/server/savecompat.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/server/savecompat.c?rev=29562&r1=29561&r2=29562&view=diff
==============================================================================
--- trunk/server/savecompat.c   (original)
+++ trunk/server/savecompat.c   Sun Aug 16 21:11:14 2015
@@ -463,6 +463,29 @@
 static void compat_load_020500(struct loaddata *loading)
 {
   const char *modname[] = { "Road", "Railroad" };
+  const char *old_activities_names[] = {
+    "Idle",
+    "Pollution",
+    "Unused Road",
+    "Mine",
+    "Irrigate",
+    "Mine",
+    "Irrigate",
+    "Fortified",
+    "Fortress",
+    "Sentry",
+    "Unused Railroad",
+    "Pillage",
+    "Goto",
+    "Explore",
+    "Transform",
+    "Unused",
+    "Unused Airbase",
+    "Fortifying",
+    "Fallout",
+    "Unused Patrol",
+    "Base"
+  };
 
   /* Check status and return if not OK (sg_success != TRUE). */
   sg_check_ret();
@@ -474,6 +497,10 @@
 
   secfile_insert_str_vec(loading->file, modname, 2,
                          "savefile.roads_vector");
+
+  secfile_insert_int(loading->file, 19, "savefile.activities_size");
+  secfile_insert_str_vec(loading->file, old_activities_names, 19,
+                         "savefile.activities_vector");
 
   /* Server setting migration. */
   {


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

Reply via email to