1
0
mirror of https://github.com/moparisthebest/minetest synced 2024-12-23 08:08:47 -05:00

support for format 0 and 1 maps

This commit is contained in:
Perttu Ahola 2011-04-11 16:58:49 +03:00
parent f5f15e38a5
commit 50a8087684
2 changed files with 7 additions and 1 deletions

View 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)
{

View 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)