diff options
author | Mattes D <github@xoft.cz> | 2014-09-05 22:16:48 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2014-09-05 22:16:48 +0200 |
commit | 137b021d26d47b11fc27df1c0b52f408f0ef5257 (patch) | |
tree | 462a02d3ab4ed76bfeb43db320435670be9f4d04 /src/Generating | |
parent | BiomeMultiCache is not used for simple generators. (diff) | |
download | cuberite-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.cpp | 3 | ||||
-rw-r--r-- | src/Generating/ChunkGenerator.h | 4 |
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; } ; |