diff options
author | Masy98 <masy@antheruscraft.de> | 2014-09-06 22:06:40 +0200 |
---|---|---|
committer | Masy98 <masy@antheruscraft.de> | 2014-09-06 22:06:40 +0200 |
commit | 9cdb9b6262a0d6ffb9f83c20ca3c9483fb245aaa (patch) | |
tree | 500cd7ff84cbf42e34eb95225e83c3f18c4258c0 /src/Generating/ChunkGenerator.h | |
parent | Fixed typo! (diff) | |
parent | Merge remote-tracking branch 'upstream/master' (diff) | |
download | cuberite-9cdb9b6262a0d6ffb9f83c20ca3c9483fb245aaa.tar cuberite-9cdb9b6262a0d6ffb9f83c20ca3c9483fb245aaa.tar.gz cuberite-9cdb9b6262a0d6ffb9f83c20ca3c9483fb245aaa.tar.bz2 cuberite-9cdb9b6262a0d6ffb9f83c20ca3c9483fb245aaa.tar.lz cuberite-9cdb9b6262a0d6ffb9f83c20ca3c9483fb245aaa.tar.xz cuberite-9cdb9b6262a0d6ffb9f83c20ca3c9483fb245aaa.tar.zst cuberite-9cdb9b6262a0d6ffb9f83c20ca3c9483fb245aaa.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Generating/ChunkGenerator.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/Generating/ChunkGenerator.h b/src/Generating/ChunkGenerator.h index 88d71f3f9..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; } ; @@ -116,7 +120,7 @@ public: void Stop(void); /// Queues the chunk for generation; removes duplicate requests - void QueueGenerateChunk(int a_ChunkX, int a_ChunkY, int a_ChunkZ); + void QueueGenerateChunk(int a_ChunkX, int a_ChunkZ, bool a_ForceGenerate); /// Generates the biomes for the specified chunk (directly, not in a separate thread). Used by the world loader if biomes failed loading. void GenerateBiomes(int a_ChunkX, int a_ChunkZ, cChunkDef::BiomeMap & a_BiomeMap); @@ -137,10 +141,10 @@ private: int m_Seed; - cCriticalSection m_CS; - cChunkCoordsList m_Queue; - cEvent m_Event; ///< Set when an item is added to the queue or the thread should terminate - cEvent m_evtRemoved; ///< Set when an item is removed from the queue + cCriticalSection m_CS; + cChunkCoordsWithBoolList m_Queue; + cEvent m_Event; ///< Set when an item is added to the queue or the thread should terminate + cEvent m_evtRemoved; ///< Set when an item is removed from the queue cGenerator * m_Generator; ///< The actual generator engine used to generate chunks @@ -154,7 +158,7 @@ private: // cIsThread override: virtual void Execute(void) override; - void DoGenerate(int a_ChunkX, int a_ChunkY, int a_ChunkZ); + void DoGenerate(int a_ChunkX, int a_ChunkZ); }; |