From 9522bd842ea845cc37b4d2a60333453c12b024a4 Mon Sep 17 00:00:00 2001 From: STRWarrior Date: Mon, 18 Aug 2014 12:53:36 +0200 Subject: SwamplandM: Fixed sometimes having no mountains. --- src/Generating/HeiGen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Generating') diff --git a/src/Generating/HeiGen.cpp b/src/Generating/HeiGen.cpp index ba11b31b4..c3f3b38a9 100644 --- a/src/Generating/HeiGen.cpp +++ b/src/Generating/HeiGen.cpp @@ -432,7 +432,7 @@ const cHeiGenBiomal::sGenParam cHeiGenBiomal::m_GenParam[256] = /* biExtremeHillsM */ { 0.1f, 2.0f, 0.05f, 12.0f, 0.01f, 10.0f, 40}, // 131 /* biFlowerForest */ { 0.1f, 2.0f, 0.05f, 12.0f, 0.01f, 10.0f, 40}, // 132 /* biTaigaM */ { 0.1f, 2.0f, 0.05f, 12.0f, 0.01f, 10.0f, 40}, // 133 - /* biSwamplandM */ { 1.0f, 2.0f, 1.10f, 5.0f, 0.01f, 8.0f, 60}, // 134 + /* biSwamplandM */ { 1.0f, 3.0f, 1.10f, 7.0f, 0.01f, 0.01f, 60}, // 134 // Biomes 135 .. 139 unused, 5 empty placeholders here: {}, {}, {}, {}, {}, // 135 .. 139 -- cgit v1.2.3 From 64fec204c4c5062461a7188b58026d062519b417 Mon Sep 17 00:00:00 2001 From: Mattes D Date: Thu, 21 Aug 2014 22:39:53 +0200 Subject: Added initializers for class members. As reported by Coverity, these weren't initialized. --- src/Generating/Caves.cpp | 3 +++ src/Generating/ChunkGenerator.cpp | 1 + src/Generating/HeiGen.cpp | 8 +++++++- 3 files changed, 11 insertions(+), 1 deletion(-) (limited to 'src/Generating') diff --git a/src/Generating/Caves.cpp b/src/Generating/Caves.cpp index 6fc371958..71154dff9 100644 --- a/src/Generating/Caves.cpp +++ b/src/Generating/Caves.cpp @@ -166,6 +166,9 @@ cCaveTunnel::cCaveTunnel( if ((a_BlockStartY <= 0) && (a_BlockEndY <= 0)) { // Don't bother detailing this cave, it's under the world anyway + m_MinBlockX = m_MaxBlockX = 0; + m_MinBlockY = m_MaxBlockY = -1; + m_MinBlockZ = m_MaxBlockZ = 0; return; } diff --git a/src/Generating/ChunkGenerator.cpp b/src/Generating/ChunkGenerator.cpp index 3d5af152c..a1188f984 100644 --- a/src/Generating/ChunkGenerator.cpp +++ b/src/Generating/ChunkGenerator.cpp @@ -27,6 +27,7 @@ const unsigned int QUEUE_SKIP_LIMIT = 500; cChunkGenerator::cChunkGenerator(void) : super("cChunkGenerator"), + m_Seed(0), // Will be overwritten by the actual generator m_Generator(NULL), m_PluginInterface(NULL), m_ChunkSink(NULL) diff --git a/src/Generating/HeiGen.cpp b/src/Generating/HeiGen.cpp index c3f3b38a9..79d529a6a 100644 --- a/src/Generating/HeiGen.cpp +++ b/src/Generating/HeiGen.cpp @@ -239,7 +239,13 @@ bool cHeiGenCache::GetHeightAt(int a_ChunkX, int a_ChunkZ, int a_RelX, int a_Rel cHeiGenClassic::cHeiGenClassic(int a_Seed) : m_Seed(a_Seed), - m_Noise(a_Seed) + m_Noise(a_Seed), + m_HeightFreq1(1.0f), + m_HeightAmp1(1.0f), + m_HeightFreq2(0.5f), + m_HeightAmp2(0.5f), + m_HeightFreq3(0.1f), + m_HeightAmp3(0.1f) { } -- cgit v1.2.3