From fd7a0735c9aeaa7978190049319e3cdfe48920a4 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Sun, 10 Apr 2011 04:15:10 +0300 Subject: new object system --- src/map.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/map.cpp') 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); -- cgit v1.2.3