Author: cazfi
Date: Sat Jan  2 21:44:45 2016
New Revision: 31317

URL: http://svn.gna.org/viewcvs/freeciv?rev=31317&view=rev
Log:
Cleaned out obsolete compatibility code for cases where city 'turn_founded' is 
not
present from savegame3.c, as it always is in the saves handled by it.

See patch #6748

Modified:
    trunk/server/savegame3.c

Modified: trunk/server/savegame3.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/server/savegame3.c?rev=31317&r1=31316&r2=31317&view=diff
==============================================================================
--- trunk/server/savegame3.c    (original)
+++ trunk/server/savegame3.c    Sat Jan  2 21:44:45 2016
@@ -4506,17 +4506,12 @@
   pcity->server.steal =
     secfile_lookup_int_default(loading->file, 0, "%s.steal", citystr);
 
-  /* before did_buy for undocumented hack */
-  pcity->turn_founded =
-    secfile_lookup_int_default(loading->file, -2, "%s.turn_founded",
-                               citystr);
+  sg_warn_ret_val(secfile_lookup_int(loading->file, &pcity->turn_founded,
+                                     "%s.turn_founded", citystr),
+                  FALSE, "%s", secfile_error());
   sg_warn_ret_val(secfile_lookup_int(loading->file, &i, "%s.did_buy",
                                      citystr), FALSE, "%s", secfile_error());
   pcity->did_buy = (i != 0);
-  if (i == -1 && pcity->turn_founded == -2) {
-    /* undocumented hack */
-    pcity->turn_founded = game.info.turn;
-  }
 
   pcity->did_sell =
     secfile_lookup_bool_default(loading->file, FALSE, "%s.did_sell", citystr);
@@ -4828,9 +4823,9 @@
     secfile_insert_int(saving->file, pcity->anarchy, "%s.anarchy", buf);
     secfile_insert_int(saving->file, pcity->rapture, "%s.rapture", buf);
     secfile_insert_int(saving->file, pcity->server.steal, "%s.steal", buf);
-
     secfile_insert_int(saving->file, pcity->turn_founded, "%s.turn_founded",
                        buf);
+
     if (pcity->turn_founded == game.info.turn) {
       j = -1; /* undocumented hack */
     } else {


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

Reply via email to