diff options
author | Tiger Wang <ziwei.tiger@outlook.com> | 2020-08-28 22:26:04 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@outlook.com> | 2020-08-28 22:26:04 +0200 |
commit | 08bd77e5472f08183beb2f0cf5a59cb5630e5e5f (patch) | |
tree | e13315dd8d2e089934391c76697b026c53f26604 /src/Chunk.cpp | |
parent | ChunkMap: do not wantonly make empty chunks (diff) | |
download | cuberite-08bd77e5472f08183beb2f0cf5a59cb5630e5e5f.tar cuberite-08bd77e5472f08183beb2f0cf5a59cb5630e5e5f.tar.gz cuberite-08bd77e5472f08183beb2f0cf5a59cb5630e5e5f.tar.bz2 cuberite-08bd77e5472f08183beb2f0cf5a59cb5630e5e5f.tar.lz cuberite-08bd77e5472f08183beb2f0cf5a59cb5630e5e5f.tar.xz cuberite-08bd77e5472f08183beb2f0cf5a59cb5630e5e5f.tar.zst cuberite-08bd77e5472f08183beb2f0cf5a59cb5630e5e5f.zip |
Diffstat (limited to 'src/Chunk.cpp')
-rw-r--r-- | src/Chunk.cpp | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/src/Chunk.cpp b/src/Chunk.cpp index 1d5908c5f..84c5e9fc5 100644 --- a/src/Chunk.cpp +++ b/src/Chunk.cpp @@ -59,7 +59,6 @@ cChunk::cChunk( cAllocationPool<cChunkData::sChunkSection> & a_Pool ): m_Presence(cpInvalid), - m_ShouldGenerateIfLoadFailed(false), m_IsLightValid(false), m_IsDirty(false), m_IsSaving(false), @@ -163,15 +162,6 @@ void cChunk::SetPresence(cChunk::ePresence a_Presence) -void cChunk::SetShouldGenerateIfLoadFailed(bool a_ShouldGenerateIfLoadFailed) -{ - m_ShouldGenerateIfLoadFailed = a_ShouldGenerateIfLoadFailed; -} - - - - - void cChunk::MarkRegenerating(void) { // Set as queued again: @@ -267,15 +257,8 @@ void cChunk::MarkLoadFailed(void) { ASSERT(m_Presence == cpQueued); - // If the chunk is marked as needed, generate it: - if (m_ShouldGenerateIfLoadFailed) - { - m_World->GetGenerator().QueueGenerateChunk({m_PosX, m_PosZ}, false); - } - else - { - m_Presence = cpInvalid; - } + // The chunk is always needed, generate it: + m_World->GetGenerator().QueueGenerateChunk({m_PosX, m_PosZ}, false); } |