diff --git a/TileGenerator.cpp b/TileGenerator.cpp index 77f8681..174cd4a 100644 --- a/TileGenerator.cpp +++ b/TileGenerator.cpp @@ -13,6 +13,7 @@ #include #include #include +#include #include "config.h" #include "PlayerAttributes.h" #include "TileGenerator.h" @@ -301,6 +302,9 @@ void TileGenerator::loadBlocks() } m_positions.push_back(std::pair(pos.x, pos.z)); } + else if (result == SQLITE_BUSY) { + usleep(10000); + } else { break; } @@ -613,6 +617,9 @@ std::map TileGenerator::getBlocksOnZ(int zPos, sq BlockPos pos = decodeBlockPos(blocknum); blocks[pos.x].push_back(Block(pos, unsigned_string(data, size))); } + else if (result == SQLITE_BUSY) { + usleep(10000); + } else { break; }