Author: jtn
Date: Tue May 12 09:22:43 2015
New Revision: 29049

URL: http://svn.gna.org/viewcvs/freeciv?rev=29049&view=rev
Log:
Use vector format for multiplier values in savegames.

This is an incompatible change. Multiplier values from old savegames
will be lost.

See gna patch #6075.

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=29049&r1=29048&r2=29049&view=diff
==============================================================================
--- trunk/server/savegame2.c    (original)
+++ trunk/server/savegame2.c    Tue May 12 09:22:43 2015
@@ -2199,7 +2199,7 @@
     for (k = 0; k < i; k++) {
       pplayer->multipliers[k] = secfile_lookup_int_default(loading->file,
                                                            
multiplier_by_number(k)->def,
-                                                           
"player%d.multiplier_%d",
+                                                           
"player%d.multiplier%d.val",
                                                            
player_slot_index(pslot), k);
     }
   } player_slots_iterate_end;

Modified: trunk/server/savegame3.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/server/savegame3.c?rev=29049&r1=29048&r2=29049&view=diff
==============================================================================
--- trunk/server/savegame3.c    (original)
+++ trunk/server/savegame3.c    Tue May 12 09:22:43 2015
@@ -3006,7 +3006,7 @@
     for (k = 0; k < i; k++) {
       pplayer->multipliers[k] = secfile_lookup_int_default(loading->file,
                                                            
multiplier_by_number(k)->def,
-                                                           
"player%d.multiplier_%d",
+                                                           
"player%d.multiplier%d.val",
                                                            
player_slot_index(pslot), k);
     }
   } player_slots_iterate_end;
@@ -3783,7 +3783,8 @@
   i = multiplier_count();
 
   for (k = 0; k < i; k++) {
-    secfile_insert_int(saving->file, plr->multipliers[k], 
"player%d.multiplier_%d", plrno, k);
+    secfile_insert_int(saving->file, plr->multipliers[k],
+                       "player%d.multiplier%d.val", plrno, k);
   }
 
   secfile_insert_str(saving->file, ai_level_name(plr->ai_common.skill_level),


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

Reply via email to