Fix for the perpetual load issue
git-svn-id: http://mc-server.googlecode.com/svn/trunk@332 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
parent
1f88db187b
commit
dee0a12029
@ -329,7 +329,13 @@ bool cChunkMap::GetChunkBlocks(int a_ChunkX, int a_ChunkY, int a_ChunkZ, char *
|
||||
bool cChunkMap::IsChunkValid(int a_ChunkX, int a_ChunkY, int a_ChunkZ)
|
||||
{
|
||||
cCSLock Lock(m_CSLayers);
|
||||
cChunkPtr Chunk = GetChunkNoGen(a_ChunkX, a_ChunkY, a_ChunkZ);
|
||||
cChunkLayer * Layer = GetLayerForChunk( a_ChunkX, a_ChunkZ );
|
||||
if (Layer == NULL)
|
||||
{
|
||||
// An error must have occurred, since layers are automatically created if they don't exist
|
||||
return false;
|
||||
}
|
||||
cChunkPtr Chunk = Layer->GetChunk(a_ChunkX, a_ChunkY, a_ChunkZ);
|
||||
return (Chunk != NULL) && Chunk->IsValid();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user