]> git.lizzy.rs Git - minetest.git/blobdiff - src/mapsector.cpp
src/client/tile.cpp: Fix reference counting
[minetest.git] / src / mapsector.cpp
index ebb050ec364be99b060ef7af72d88a41351293ef..3fe81dc902e13c943b9af7e990ff5e082d4cd75f 100644 (file)
@@ -18,12 +18,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 */
 
 #include "mapsector.h"
-#include "jmutexautolock.h"
-#ifndef SERVER
-#include "client.h"
-#endif
 #include "exceptions.h"
 #include "mapblock.h"
+#include "serialization.h"
 
 MapSector::MapSector(Map *parent, v2s16 pos, IGameDef *gamedef):
                differs_from_disk(false),
@@ -88,7 +85,7 @@ MapBlock * MapSector::getBlockNoCreateNoEx(s16 y)
 
 MapBlock * MapSector::createBlankBlockNoInsert(s16 y)
 {
-       assert(getBlockBuffered(y) == NULL);
+       assert(getBlockBuffered(y) == NULL);    // Pre-condition
 
        v3s16 blockpos_map(m_pos.X, y, m_pos.Y);
        
@@ -136,7 +133,7 @@ void MapSector::deleteBlock(MapBlock *block)
        delete block;
 }
 
-void MapSector::getBlocks(std::list<MapBlock*> &dest)
+void MapSector::getBlocks(MapBlockVect &dest)
 {
        for(std::map<s16, MapBlock*>::iterator bi = m_blocks.begin();
                bi != m_blocks.end(); ++bi)