summaryrefslogtreecommitdiffstats
path: root/src/Generating
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-09-05 22:16:48 +0200
committerMattes D <github@xoft.cz>2014-09-05 22:16:48 +0200
commit137b021d26d47b11fc27df1c0b52f408f0ef5257 (patch)
tree462a02d3ab4ed76bfeb43db320435670be9f4d04 /src/Generating
parentBiomeMultiCache is not used for simple generators. (diff)
downloadcuberite-137b021d26d47b11fc27df1c0b52f408f0ef5257.tar
cuberite-137b021d26d47b11fc27df1c0b52f408f0ef5257.tar.gz
cuberite-137b021d26d47b11fc27df1c0b52f408f0ef5257.tar.bz2
cuberite-137b021d26d47b11fc27df1c0b52f408f0ef5257.tar.lz
cuberite-137b021d26d47b11fc27df1c0b52f408f0ef5257.tar.xz
cuberite-137b021d26d47b11fc27df1c0b52f408f0ef5257.tar.zst
cuberite-137b021d26d47b11fc27df1c0b52f408f0ef5257.zip
Diffstat (limited to 'src/Generating')
-rw-r--r--src/Generating/ChunkGenerator.cpp3
-rw-r--r--src/Generating/ChunkGenerator.h4
2 files changed, 6 insertions, 1 deletions
diff --git a/src/Generating/ChunkGenerator.cpp b/src/Generating/ChunkGenerator.cpp
index 4fa9729ec..d8dbb4a3a 100644
--- a/src/Generating/ChunkGenerator.cpp
+++ b/src/Generating/ChunkGenerator.cpp
@@ -283,7 +283,8 @@ void cChunkGenerator::DoGenerate(int a_ChunkX, int a_ChunkZ)
{
ASSERT(m_PluginInterface != NULL);
ASSERT(m_ChunkSink != NULL);
-
+ ASSERT(m_ChunkSink->IsChunkQueued(a_ChunkX, a_ChunkZ));
+
cChunkDesc ChunkDesc(a_ChunkX, a_ChunkZ);
m_PluginInterface->CallHookChunkGenerating(ChunkDesc);
m_Generator->DoGenerate(a_ChunkX, a_ChunkZ, ChunkDesc);
diff --git a/src/Generating/ChunkGenerator.h b/src/Generating/ChunkGenerator.h
index e880a6766..190d9e616 100644
--- a/src/Generating/ChunkGenerator.h
+++ b/src/Generating/ChunkGenerator.h
@@ -106,6 +106,10 @@ public:
If this callback returns false, the chunk is not generated.
*/
virtual bool HasChunkAnyClients(int a_ChunkX, int a_ChunkZ) = 0;
+
+ /** Called to check whether the specified chunk is in the queued state.
+ Currently used only in Debug-mode asserts. */
+ virtual bool IsChunkQueued(int a_ChunkX, int a_ChunkZ) = 0;
} ;