summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2015-04-21 23:12:47 +0200
committerMattes D <github@xoft.cz>2015-04-21 23:12:47 +0200
commit18690a2633cc6ef3a57be9300cbc4418914d1325 (patch)
treea587c8573b0819705c12159ad9559c52d10cecf3
parentMerge pull request #1879 from mc-server/DynamicThreshold (diff)
downloadcuberite-18690a2633cc6ef3a57be9300cbc4418914d1325.tar
cuberite-18690a2633cc6ef3a57be9300cbc4418914d1325.tar.gz
cuberite-18690a2633cc6ef3a57be9300cbc4418914d1325.tar.bz2
cuberite-18690a2633cc6ef3a57be9300cbc4418914d1325.tar.lz
cuberite-18690a2633cc6ef3a57be9300cbc4418914d1325.tar.xz
cuberite-18690a2633cc6ef3a57be9300cbc4418914d1325.tar.zst
cuberite-18690a2633cc6ef3a57be9300cbc4418914d1325.zip
Diffstat (limited to '')
-rw-r--r--src/ChunkMap.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ChunkMap.cpp b/src/ChunkMap.cpp
index 87da86131..394dc703b 100644
--- a/src/ChunkMap.cpp
+++ b/src/ChunkMap.cpp
@@ -2413,6 +2413,7 @@ bool cChunkMap::GenerateChunk(int a_ChunkX, int a_ChunkZ, cChunkCoordCallback *
// Try loading the chunk:
if ((Chunk == nullptr) || (!Chunk->IsValid()))
{
+ Chunk->SetPresence(cChunk::cpQueued);
class cPrepareLoadCallback: public cChunkCoordCallback
{
public:
@@ -2427,6 +2428,7 @@ bool cChunkMap::GenerateChunk(int a_ChunkX, int a_ChunkZ, cChunkCoordCallback *
virtual void Call(int a_CBChunkX, int a_CBChunkZ) override
{
// The chunk has been loaded or an error occurred, check if it's valid now:
+ cCSLock Lock(m_ChunkMap.m_CSLayers);
cChunkPtr CBChunk = m_ChunkMap.GetChunkNoLoad(a_CBChunkX, a_CBChunkZ);
if (CBChunk == nullptr)