]> git.lizzy.rs Git - minetest.git/commitdiff
support for format 0 and 1 maps
authorPerttu Ahola <celeron55@gmail.com>
Mon, 11 Apr 2011 13:58:49 +0000 (16:58 +0300)
committerPerttu Ahola <celeron55@gmail.com>
Mon, 11 Apr 2011 13:58:49 +0000 (16:58 +0300)
src/mapblock.cpp
src/serialization.h

index 377e2843565179fe8179fef10862dcda10aba50b..38c081eec9d58ea3dc9d77ae750931eff58a0d77 100644 (file)
@@ -1936,6 +1936,12 @@ void MapBlock::deSerialize(std::istream &is, u8 version)
        if(!ser_ver_supported(version))
                throw VersionMismatchException("ERROR: MapBlock format not supported");
 
+       // These have no lighting info
+       if(version <= 1)
+       {
+               setLightingExpired(true);
+       }
+
        // These have no compression
        if(version <= 3 || version == 5 || version == 6)
        {
index 7b5c7d418e12970b59d34911bf14b4ea2f3f9705..26ab90e36a4ac62122a5c3c1a3ecc6a3c2e4a09d 100644 (file)
@@ -54,7 +54,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 // Highest supported serialization version
 #define SER_FMT_VER_HIGHEST 15
 // Lowest supported serialization version
-#define SER_FMT_VER_LOWEST 2
+#define SER_FMT_VER_LOWEST 0
 
 #define ser_ver_supported(v) (v >= SER_FMT_VER_LOWEST && v <= SER_FMT_VER_HIGHEST)