diff options
author | Perttu Ahola <celeron55@gmail.com> | 2011-04-04 05:12:33 +0300 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2011-04-04 05:12:33 +0300 |
commit | fa736e138c2eb04f50bcc0431fc5a0435bf34bc6 (patch) | |
tree | ec56483bbb6196b5959d9c43a16e04f3b26e227b /src/mapblock.cpp | |
parent | fa08294d09a46b603e9ff5e034010c0a7986c61a (diff) | |
download | minetest-fa736e138c2eb04f50bcc0431fc5a0435bf34bc6.tar.gz minetest-fa736e138c2eb04f50bcc0431fc5a0435bf34bc6.tar.bz2 minetest-fa736e138c2eb04f50bcc0431fc5a0435bf34bc6.zip |
fully implemented the sign with the new framework
Diffstat (limited to 'src/mapblock.cpp')
-rw-r--r-- | src/mapblock.cpp | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/src/mapblock.cpp b/src/mapblock.cpp index e895f7749..c14fbd04e 100644 --- a/src/mapblock.cpp +++ b/src/mapblock.cpp @@ -1878,8 +1878,6 @@ void MapBlock::serialize(std::ostream &os, u8 version) flags |= 0x02; if(m_lighting_expired) flags |= 0x04; - /*if(m_not_fully_generated) - flags |= 0x08;*/ os.write((char*)&flags, 1); u32 nodecount = MAP_BLOCKSIZE*MAP_BLOCKSIZE*MAP_BLOCKSIZE; @@ -1913,6 +1911,14 @@ void MapBlock::serialize(std::ostream &os, u8 version) */ compress(databuf, os, version); + + /* + NodeMetadata + */ + if(version >= 14) + { + m_node_metadata.serialize(os); + } } } @@ -2002,7 +2008,6 @@ void MapBlock::deSerialize(std::istream &is, u8 version) is_underground = (flags & 0x01) ? true : false; m_day_night_differs = (flags & 0x02) ? true : false; m_lighting_expired = (flags & 0x04) ? true : false; - //m_not_fully_generated = (flags & 0x08) ? true : false; // Uncompress data std::ostringstream os(std::ios_base::binary); @@ -2027,6 +2032,14 @@ void MapBlock::deSerialize(std::istream &is, u8 version) { data[i].param2 = s[i+nodecount*2]; } + + /* + NodeMetadata + */ + if(version >= 14) + { + m_node_metadata.deSerialize(is); + } } /* |