1
0

Chunk now has an indicator of load failure; Chunk generator uses cChunkStay

git-svn-id: http://mc-server.googlecode.com/svn/trunk@337 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
madmaxoft@gmail.com
2012-02-28 12:11:14 +00:00
parent 230f98a774
commit 013ae71c87
9 changed files with 89 additions and 6 deletions

View File

@@ -782,6 +782,11 @@ bool cChunkMap::LoadChunk(int a_ChunkX, int a_ChunkY, int a_ChunkZ)
// Already loaded
return true;
}
if (Chunk->HasLoadFailed())
{
// Already tried loading and it failed
return false;
}
}
return m_World->GetStorage().LoadChunk(a_ChunkX, a_ChunkY, a_ChunkZ);
}
@@ -803,6 +808,21 @@ void cChunkMap::LoadChunks(const cChunkCoordsList & a_Chunks)
void cChunkMap::ChunkLoadFailed(int a_ChunkX, int a_ChunkY, int a_ChunkZ)
{
cCSLock Lock(m_CSLayers);
cChunkPtr Chunk = GetChunkNoLoad(a_ChunkX, a_ChunkY, a_ChunkZ);
if (Chunk == NULL)
{
return;
}
Chunk->MarkLoadFailed();
}
void cChunkMap::UpdateSign(int a_X, int a_Y, int a_Z, const AString & a_Line1, const AString & a_Line2, const AString & a_Line3, const AString & a_Line4)
{
cCSLock Lock(m_CSLayers);