diff options
author | Perttu Ahola <celeron55@gmail.com> | 2011-04-10 04:15:10 +0300 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2011-04-10 04:15:10 +0300 |
commit | fd7a0735c9aeaa7978190049319e3cdfe48920a4 (patch) | |
tree | 655709280d2940de54bd489a24821a158cea787d /src/map.cpp | |
parent | c0f0c6568bb45350e65f31476578feff879831bf (diff) | |
download | minetest-fd7a0735c9aeaa7978190049319e3cdfe48920a4.tar.gz minetest-fd7a0735c9aeaa7978190049319e3cdfe48920a4.tar.bz2 minetest-fd7a0735c9aeaa7978190049319e3cdfe48920a4.zip |
new object system
Diffstat (limited to 'src/map.cpp')
-rw-r--r-- | src/map.cpp | 16 |
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); |