summaryrefslogtreecommitdiff
path: root/src/mapblock.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mapblock.cpp')
-rw-r--r--src/mapblock.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mapblock.cpp b/src/mapblock.cpp
index bc678db15..016cb222e 100644
--- a/src/mapblock.cpp
+++ b/src/mapblock.cpp
@@ -48,6 +48,7 @@ MapBlock::MapBlock(Map *parent, v3s16 pos, IGameDef *gamedef, bool dummy):
m_day_night_differs(false),
m_generated(false),
m_timestamp(BLOCK_TIMESTAMP_UNDEFINED),
+ m_disk_timestamp(BLOCK_TIMESTAMP_UNDEFINED),
m_usage_timer(0)
{
data = NULL;
@@ -928,10 +929,12 @@ void MapBlock::deSerializeDiskExtra(std::istream &is, u8 version)
m_static_objects.deSerialize(is);
// Timestamp
- if(version >= 17)
+ if(version >= 17){
setTimestamp(readU32(is));
- else
+ m_disk_timestamp = m_timestamp;
+ } else {
setTimestamp(BLOCK_TIMESTAMP_UNDEFINED);
+ }
// Dynamically re-set ids based on node names
NameIdMapping nimap;