summaryrefslogtreecommitdiffstats
path: root/source/cChunkGenerator.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-04-10 13:22:11 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-04-10 13:22:11 +0200
commitc51a4b9469fee0314d1b849206d1cf1c7c1240e4 (patch)
tree655d6a392b5483eea1453a08c24e269f8ae68d09 /source/cChunkGenerator.cpp
parentCompression error -5 fix (diff)
downloadcuberite-c51a4b9469fee0314d1b849206d1cf1c7c1240e4.tar
cuberite-c51a4b9469fee0314d1b849206d1cf1c7c1240e4.tar.gz
cuberite-c51a4b9469fee0314d1b849206d1cf1c7c1240e4.tar.bz2
cuberite-c51a4b9469fee0314d1b849206d1cf1c7c1240e4.tar.lz
cuberite-c51a4b9469fee0314d1b849206d1cf1c7c1240e4.tar.xz
cuberite-c51a4b9469fee0314d1b849206d1cf1c7c1240e4.tar.zst
cuberite-c51a4b9469fee0314d1b849206d1cf1c7c1240e4.zip
Diffstat (limited to 'source/cChunkGenerator.cpp')
-rw-r--r--source/cChunkGenerator.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/cChunkGenerator.cpp b/source/cChunkGenerator.cpp
index fdfdeab46..67b004a69 100644
--- a/source/cChunkGenerator.cpp
+++ b/source/cChunkGenerator.cpp
@@ -155,15 +155,17 @@ void cChunkGenerator::Execute(void)
Lock.Unlock(); // Unlock ASAP
m_evtRemoved.Set();
- if (m_World->IsChunkValid(coords.m_ChunkX, coords.m_ChunkY, coords.m_ChunkZ))
+ // Hack for regenerating chunks: if Y != 0, the chunk is considered invalid, even if it has its data set
+ if ((coords.m_ChunkY == 0) && m_World->IsChunkValid(coords.m_ChunkX, coords.m_ChunkY, coords.m_ChunkZ))
{
+ LOGD("Chunk [%d, %d] already generated, skipping generation", coords.m_ChunkX, coords.m_ChunkZ);
// Already generated, ignore request
continue;
}
if (SkipEnabled && !m_World->HasChunkAnyClients(coords.m_ChunkX, coords.m_ChunkY, coords.m_ChunkZ))
{
- LOGWARNING("Chunk generator overloaded, skipping chunk [%d, %d, %d] (HasClients: %d)", coords.m_ChunkX, coords.m_ChunkY, coords.m_ChunkZ);
+ LOGWARNING("Chunk generator overloaded, skipping chunk [%d, %d, %d]", coords.m_ChunkX, coords.m_ChunkY, coords.m_ChunkZ);
continue;
}