summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLO1ZB <andreasdaamen@web.de>2014-08-29 20:19:45 +0200
committerLO1ZB <andreasdaamen@web.de>2014-08-29 20:19:45 +0200
commit75e131638616c68d126eb64abdf903a93dd7322f (patch)
tree2b8e047e67d21e4d642cd856bdbcab0c1689e94a
parentremove y-coord from chunks (diff)
downloadcuberite-75e131638616c68d126eb64abdf903a93dd7322f.tar
cuberite-75e131638616c68d126eb64abdf903a93dd7322f.tar.gz
cuberite-75e131638616c68d126eb64abdf903a93dd7322f.tar.bz2
cuberite-75e131638616c68d126eb64abdf903a93dd7322f.tar.lz
cuberite-75e131638616c68d126eb64abdf903a93dd7322f.tar.xz
cuberite-75e131638616c68d126eb64abdf903a93dd7322f.tar.zst
cuberite-75e131638616c68d126eb64abdf903a93dd7322f.zip
-rw-r--r--src/Generating/ChunkGenerator.cpp8
-rw-r--r--src/World.cpp8
-rw-r--r--src/World.h2
3 files changed, 9 insertions, 9 deletions
diff --git a/src/Generating/ChunkGenerator.cpp b/src/Generating/ChunkGenerator.cpp
index 4d0cf3192..a1c3d50cc 100644
--- a/src/Generating/ChunkGenerator.cpp
+++ b/src/Generating/ChunkGenerator.cpp
@@ -245,14 +245,6 @@ void cChunkGenerator::Execute(void)
LastReportTick = clock();
}
- // Hack for regenerating chunks: if Y != 0, the chunk is considered invalid, even if it has its data set
- if (m_ChunkSink->IsChunkValid(coords.m_ChunkX, 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_ChunkSink->HasChunkAnyClients(coords.m_ChunkX, coords.m_ChunkZ))
{
LOGWARNING("Chunk generator overloaded, skipping chunk [%d, %d]", coords.m_ChunkX, coords.m_ChunkZ);
diff --git a/src/World.cpp b/src/World.cpp
index eba3a8357..aba5bd859 100644
--- a/src/World.cpp
+++ b/src/World.cpp
@@ -2909,7 +2909,15 @@ void cWorld::RegenerateChunk(int a_ChunkX, int a_ChunkZ)
void cWorld::GenerateChunk(int a_ChunkX, int a_ChunkZ)
{
+ if (!(m_ChunkMap->IsChunkValid(a_ChunkX, a_ChunkZ)))
+ {
+ LOGD("Chunk [%d, %d] already generated, skipping generation", a_ChunkX, a_ChunkZ);
+ // Already generated, ignore reques
+ }
+ else
+ {
m_Generator.QueueGenerateChunk(a_ChunkX, a_ChunkZ);
+ }
}
diff --git a/src/World.h b/src/World.h
index 50b157312..49e30694e 100644
--- a/src/World.h
+++ b/src/World.h
@@ -380,7 +380,7 @@ public:
/** Regenerate the given chunk: */
void RegenerateChunk(int a_ChunkX, int a_ChunkZ); // tolua_export
- /** Generates the given chunk, if not already generated */
+ /** Generates the given chunk */
void GenerateChunk(int a_ChunkX, int a_ChunkZ); // tolua_export
/** Queues a chunk for lighting; a_Callback is called after the chunk is lighted */