summaryrefslogtreecommitdiffstats
path: root/source/cChunkMap.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-02-28 13:11:14 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-02-28 13:11:14 +0100
commit013ae71c871c81437a1bad197e0bf7481d02b4a6 (patch)
tree13191934b88edd6d8ecaab43c82425c5dd719264 /source/cChunkMap.cpp
parentImplemented synchronous chunk loading; optimized cChunkStay interface for speed (though still unused ;) (diff)
downloadcuberite-013ae71c871c81437a1bad197e0bf7481d02b4a6.tar
cuberite-013ae71c871c81437a1bad197e0bf7481d02b4a6.tar.gz
cuberite-013ae71c871c81437a1bad197e0bf7481d02b4a6.tar.bz2
cuberite-013ae71c871c81437a1bad197e0bf7481d02b4a6.tar.lz
cuberite-013ae71c871c81437a1bad197e0bf7481d02b4a6.tar.xz
cuberite-013ae71c871c81437a1bad197e0bf7481d02b4a6.tar.zst
cuberite-013ae71c871c81437a1bad197e0bf7481d02b4a6.zip
Diffstat (limited to '')
-rw-r--r--source/cChunkMap.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/source/cChunkMap.cpp b/source/cChunkMap.cpp
index 2f4d39ca2..0485df1eb 100644
--- a/source/cChunkMap.cpp
+++ b/source/cChunkMap.cpp
@@ -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);