diff options
Diffstat (limited to 'src/map.cpp')
-rw-r--r-- | src/map.cpp | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/map.cpp b/src/map.cpp index 35bd485a4..9c06750b8 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -1473,11 +1473,11 @@ void Map::timerUpdate(float dtime, float unload_timeout, v3s16 p = block->getPos(); // Save if modified - if(block->getModified() != MOD_STATE_CLEAN - && save_before_unloading) + if (block->getModified() != MOD_STATE_CLEAN && save_before_unloading) { modprofiler.add(block->getModifiedReason(), 1); - saveBlock(block); + if (!saveBlock(block)) + continue; saved_blocks_count++; } @@ -3253,20 +3253,23 @@ bool ServerMap::loadSectorFull(v2s16 p2d) } #endif -void ServerMap::beginSave() { +void ServerMap::beginSave() +{ dbase->beginSave(); } -void ServerMap::endSave() { +void ServerMap::endSave() +{ dbase->endSave(); } -void ServerMap::saveBlock(MapBlock *block) +bool ServerMap::saveBlock(MapBlock *block) { - dbase->saveBlock(block); + return dbase->saveBlock(block); } -void ServerMap::loadBlock(std::string sectordir, std::string blockfile, MapSector *sector, bool save_after_load) +void ServerMap::loadBlock(std::string sectordir, std::string blockfile, + MapSector *sector, bool save_after_load) { DSTACK(__FUNCTION_NAME); |