summaryrefslogtreecommitdiff
path: root/src/mapblock.cpp
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2017-05-10 15:29:21 +0200
committerLoïc Blot <nerzhul@users.noreply.github.com>2017-05-10 15:29:21 +0200
commit071e114ffa945522a7a9acc3259427166992d5ee (patch)
treeb76be5cdc27e9a8d9b58ff15f80691e012afa702 /src/mapblock.cpp
parent6945f807abd789e0f522351e5e790ff2afced233 (diff)
downloadminetest-071e114ffa945522a7a9acc3259427166992d5ee.tar.gz
minetest-071e114ffa945522a7a9acc3259427166992d5ee.tar.bz2
minetest-071e114ffa945522a7a9acc3259427166992d5ee.zip
Private nodemeta (#5702)
* Private node metadata that isn't sent to the client
Diffstat (limited to 'src/mapblock.cpp')
-rw-r--r--src/mapblock.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/mapblock.cpp b/src/mapblock.cpp
index 1a0b01f2b..ec10a49bb 100644
--- a/src/mapblock.cpp
+++ b/src/mapblock.cpp
@@ -611,7 +611,7 @@ void MapBlock::serialize(std::ostream &os, u8 version, bool disk)
Node metadata
*/
std::ostringstream oss(std::ios_base::binary);
- m_node_metadata.serialize(oss);
+ m_node_metadata.serialize(oss, version, disk);
compressZlib(oss.str(), os);
/*
@@ -669,11 +669,10 @@ void MapBlock::deSerialize(std::istream &is, u8 version, bool disk)
u8 flags = readU8(is);
is_underground = (flags & 0x01) ? true : false;
m_day_night_differs = (flags & 0x02) ? true : false;
- if (version < 27) {
+ if (version < 27)
m_lighting_complete = 0xFFFF;
- } else {
+ else
m_lighting_complete = readU16(is);
- }
m_generated = (flags & 0x08) ? false : true;
/*