Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2005:
[Freeciv-Dev] Re: (PR#12336) spec_sprites aren't saved in savegames
Home

[Freeciv-Dev] Re: (PR#12336) spec_sprites aren't saved in savegames

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] Re: (PR#12336) spec_sprites aren't saved in savegames
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 23 Feb 2005 10:27:06 -0800
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=12336 >

Jason Short wrote:
> <URL: http://bugs.freeciv.org/Ticket/Display.html?id=12336 >
> 
> If you save a game your spec_sprites aren't saved.  So if you play earth 
> denmark may get special graphics, but if you save and reload they will 
> be lost.

I think this problem exists only for pregame saves.  There is a return 
condition in map_save that may cut out the saving of the spec_sprites. 
This patch fixes it (for both branches).

-jason

? diff
Index: server/savegame.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/savegame.c,v
retrieving revision 1.222
diff -u -r1.222 savegame.c
--- server/savegame.c   23 Feb 2005 03:34:06 -0000      1.222
+++ server/savegame.c   23 Feb 2005 18:25:53 -0000
@@ -688,6 +688,13 @@
       }
     }
   }
+
+  whole_map_iterate(ptile) {
+    if (ptile->spec_sprite) {
+      secfile_insert_str(file, ptile->spec_sprite, "map.spec_sprite_%d_%d",
+                        ptile->nat_x, ptile->nat_y);
+    }
+  } whole_map_iterate_end;
     
   /* put the terrain type */
   SAVE_NORMAL_MAP_DATA(ptile, file, "map.t%03d",
@@ -740,14 +747,6 @@
     SAVE_NORMAL_MAP_DATA(ptile, file, "map.i%03d",
                         bin2ascii_hex(ptile->known, 7));
   }
-
-  whole_map_iterate(ptile) {
-    if (ptile->spec_sprite) {
-      secfile_insert_str(file, ptile->spec_sprite, 
-                        "map.spec_sprite_%d_%d",
-                        ptile->nat_x, ptile->nat_y);
-    }
-  } whole_map_iterate_end;
 }
 
 /*

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] Re: (PR#12336) spec_sprites aren't saved in savegames, Jason Short <=