1
0
Fork 0

Hotfixed some chunk presence issues when generating.

This commit is contained in:
Mattes D 2015-04-21 23:12:47 +02:00
parent 0ff7514351
commit 18690a2633
1 changed files with 2 additions and 0 deletions

View File

@ -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)