Author: cazfi
Date: Sun Apr 10 10:04:23 2016
New Revision: 32328

URL: http://svn.gna.org/viewcvs/freeciv?rev=32328&view=rev
Log:
Save reproducible dummy turn change time value instead of real one when 
testmatic enabled.

See bug #23836

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=32328&r1=32327&r2=32328&view=diff
==============================================================================
--- branches/S2_6/server/savegame2.c    (original)
+++ branches/S2_6/server/savegame2.c    Sun Apr 10 10:04:23 2016
@@ -148,6 +148,10 @@
 #include "savegame2.h"
 
 extern bool sg_success;
+
+#ifdef FREECIV_TESTMATIC
+#define SAVE_DUMMY_TURN_CHANGE_TIME 1
+#endif
 
 /*
  * This loops over the entire map to save data. It collects all the data of
@@ -2435,8 +2439,13 @@
     } else {
       saving->save_players = TRUE;
     }
+#ifndef SAVE_DUMMY_TURN_CHANGE_TIME
     secfile_insert_int(saving->file, game.server.turn_change_time * 100,
                        "game.last_turn_change_time");
+#else  /* SAVE_DUMMY_TURN_CHANGE_TIME */
+    secfile_insert_int(saving->file, game.info.turn * 10,
+                       "game.last_turn_change_time");
+#endif /* SAVE_DUMMY_TURN_CHANGE_TIME */
   }
   secfile_insert_bool(saving->file, saving->save_players,
                       "game.save_players");


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

Reply via email to