From 57bb03148af3ad2adf2e613cf11ec8bc1852e00e Mon Sep 17 00:00:00 2001 From: STRWarrior Date: Tue, 29 Jul 2014 13:13:23 +0200 Subject: [PATCH] SingleTopBlock: All blocktypes and biometypes get initialized properly --- src/Generating/FinishGen.h | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/Generating/FinishGen.h b/src/Generating/FinishGen.h index a856b2cda..2500ab344 100644 --- a/src/Generating/FinishGen.h +++ b/src/Generating/FinishGen.h @@ -161,13 +161,25 @@ public: m_Noise(a_Seed), m_BlockType(a_BlockType), m_Amount(a_Amount) - { + { + // Initialize all the block types. + for (int idx = 0; idx < ARRAYCOUNT(m_IsAllowedBelow); ++idx) + { + m_IsAllowedBelow[idx] = false; + } + // Load the allowed blocks into m_IsAllowedBelow for (BlockList::iterator itr = a_AllowedBelow.begin(); itr != a_AllowedBelow.end(); ++itr) { m_IsAllowedBelow[*itr] = true; } - + + // Initialize all the biome types. + for (int idx = 0; idx < ARRAYCOUNT(m_IsBiomeAllowed); ++idx) + { + m_IsBiomeAllowed[idx] = false; + } + // Load the allowed biomes into m_IsBiomeAllowed for (BiomeList::iterator itr = a_Biomes.begin(); itr != a_Biomes.end(); ++itr) {