Author: cazfi
Date: Wed Sep  9 20:42:34 2015
New Revision: 29839

URL: http://svn.gna.org/viewcvs/freeciv?rev=29839&view=rev
Log:
Do not load huts from the pre-2.6 savegame if have_huts is FALSE.

See bug #21345

Modified:
    trunk/server/savegame2.c

Modified: trunk/server/savegame2.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/server/savegame2.c?rev=29839&r1=29838&r2=29839&view=diff
==============================================================================
--- trunk/server/savegame2.c    (original)
+++ trunk/server/savegame2.c    Wed Sep  9 20:42:34 2015
@@ -849,6 +849,17 @@
       continue;
     }
 
+    if (sp == S_HUT && !map.server.have_huts) {
+      /* It would be logical to have this in the saving side -
+       * really not saving the huts in the first place, BUT
+       * 1) They have been saved by older versions, so we
+       *    have to deal with such savegames.
+       * 2) This makes scenario author less likely to lose
+       *    one's work completely after carefully placing huts
+       *    and then saving with 'have_huts' disabled. */
+      continue;
+    }
+
     if (bin & (1 << i)) {
       if (sp == S_OLD_ROAD) {
         struct road_type *proad;


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

Reply via email to