Author: sveinung
Date: Thu Mar 16 18:00:08 2017
New Revision: 35123

URL: http://svn.gna.org/viewcvs/freeciv?rev=35123&view=rev
Log:
Prepare action order saving for generic actions.

See hrm Feature #644963

Modified:
    branches/S3_0/server/savegame3.c

Modified: branches/S3_0/server/savegame3.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S3_0/server/savegame3.c?rev=35123&r1=35122&r2=35123&view=diff
==============================================================================
--- branches/S3_0/server/savegame3.c    (original)
+++ branches/S3_0/server/savegame3.c    Thu Mar 16 18:00:08 2017
@@ -1707,21 +1707,21 @@
   }
 
   /* Save action order in the savegame. */
-  secfile_insert_int(saving->file, ACTION_COUNT,
+  secfile_insert_int(saving->file, NUM_ACTIONS,
                      "savefile.action_size");
-  if (ACTION_COUNT > 0) {
+  if (NUM_ACTIONS > 0) {
     const char **modname;
     int j;
 
     i = 0;
-    modname = fc_calloc(ACTION_COUNT, sizeof(*modname));
-
-    for (j = 0; j < ACTION_COUNT; j++) {
-      modname[i++] = gen_action_name(j);
+    modname = fc_calloc(NUM_ACTIONS, sizeof(*modname));
+
+    for (j = 0; j < NUM_ACTIONS; j++) {
+      modname[i++] = action_id_rule_name(j);
     }
 
     secfile_insert_str_vec(saving->file, modname,
-                           ACTION_COUNT,
+                           NUM_ACTIONS,
                            "savefile.action_vector");
     free(modname);
   }


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

Reply via email to