Author: cazfi
Date: Sun Jan 24 13:32:11 2016
New Revision: 31566

URL: http://svn.gna.org/viewcvs/freeciv?rev=31566&view=rev
Log:
Do not save documentary seed values to the savegame if they are zero.

See patch #6839

Modified:
    branches/S2_6/server/savegame2.c

Modified: branches/S2_6/server/savegame2.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/server/savegame2.c?rev=31566&r1=31565&r2=31566&view=diff
==============================================================================
--- branches/S2_6/server/savegame2.c    (original)
+++ branches/S2_6/server/savegame2.c    Sun Jan 24 13:32:11 2016
@@ -2404,10 +2404,14 @@
                      "game.cooling");
   secfile_insert_int(saving->file, game.info.coolinglevel,
                      "game.coolinglevel");
-
-  /* For debugging purposes only */
-  secfile_insert_int(saving->file, game.server.seed,
-                     "game.random_seed");
+  /* For debugging purposes only.
+   * Do not save it if it's 0 (not known);
+   * this confuses people reading this 'document' less than
+   * saving 0. */
+  if (game.server.seed != 0) {
+    secfile_insert_int(saving->file, game.server.seed,
+                       "game.random_seed");
+  }
 
   /* Global advances. */
   for (i = 0; i < game.control.num_tech_types; i++) {
@@ -2823,9 +2827,14 @@
     return;
   }
 
-  /* For debugging purposes only */
-  secfile_insert_int(saving->file, game.map.server.seed,
-                     "map.random_seed");
+  /* For debugging purposes only.
+   * Do not save it if it's 0 (not known);
+   * this confuses people reading this 'document' less than
+   * saving 0. */
+  if (game.map.server.seed) {
+    secfile_insert_int(saving->file, game.map.server.seed,
+                       "map.random_seed");
+  }
 
   sg_save_map_tiles(saving);
   sg_save_map_startpos(saving);


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

Reply via email to