summaryrefslogtreecommitdiff
path: root/src/map.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/map.cpp')
-rw-r--r--src/map.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/map.cpp b/src/map.cpp
index 49ed2f5fe..59cf937c0 100644
--- a/src/map.cpp
+++ b/src/map.cpp
@@ -5239,6 +5239,14 @@ void ServerMap::saveBlock(MapBlock *block)
block->serializeObjects(o, version);
}
+ /*
+ Versions up from 15 have static objects.
+ */
+ if(version >= 15)
+ {
+ block->m_static_objects.serialize(o);
+ }
+
// We just wrote it to the disk
block->resetChangedFlag();
}
@@ -5296,6 +5304,14 @@ void ServerMap::loadBlock(std::string sectordir, std::string blockfile, MapSecto
block->updateObjects(is, version, NULL, 0);
}
+ /*
+ Versions up from 15 have static objects.
+ */
+ if(version >= 15)
+ {
+ block->m_static_objects.deSerialize(is);
+ }
+
if(created_new)
sector->insertBlock(block);