1
0
Fork 0

SingleTopBlock: All blocktypes and biometypes get initialized properly

This commit is contained in:
STRWarrior 2014-07-29 13:13:23 +02:00
parent e74984675c
commit 57bb03148a
1 changed files with 14 additions and 2 deletions

View File

@ -161,13 +161,25 @@ public:
m_Noise(a_Seed), m_Noise(a_Seed),
m_BlockType(a_BlockType), m_BlockType(a_BlockType),
m_Amount(a_Amount) 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 // Load the allowed blocks into m_IsAllowedBelow
for (BlockList::iterator itr = a_AllowedBelow.begin(); itr != a_AllowedBelow.end(); ++itr) for (BlockList::iterator itr = a_AllowedBelow.begin(); itr != a_AllowedBelow.end(); ++itr)
{ {
m_IsAllowedBelow[*itr] = true; 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 // Load the allowed biomes into m_IsBiomeAllowed
for (BiomeList::iterator itr = a_Biomes.begin(); itr != a_Biomes.end(); ++itr) for (BiomeList::iterator itr = a_Biomes.begin(); itr != a_Biomes.end(); ++itr)
{ {