Hotfixed some chunk presence issues when generating.
This commit is contained in:
parent
0ff7514351
commit
18690a2633
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user