Author: sveinung
Date: Thu Mar 16 17:57:42 2017
New Revision: 35120
URL: http://svn.gna.org/viewcvs/freeciv?rev=35120&view=rev
Log:
Prepare action order saving for generic actions.
See hrm Feature #644963
Modified:
trunk/server/savegame3.c
Modified: trunk/server/savegame3.c
URL:
http://svn.gna.org/viewcvs/freeciv/trunk/server/savegame3.c?rev=35120&r1=35119&r2=35120&view=diff
==============================================================================
--- trunk/server/savegame3.c (original)
+++ trunk/server/savegame3.c Thu Mar 16 17:57:42 2017
@@ -1726,21 +1726,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
[email protected]
https://mail.gna.org/listinfo/freeciv-commits