From 7abaede2457e494290882d9795873aab2309da65 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Sat, 2 Jun 2012 12:19:20 +0000 Subject: Added the Biomal height generator, made it the default height generator. git-svn-id: http://mc-server.googlecode.com/svn/trunk@536 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/cChunkGenerator.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'source/cChunkGenerator.cpp') diff --git a/source/cChunkGenerator.cpp b/source/cChunkGenerator.cpp index 16c6eae58..5aa50c20a 100644 --- a/source/cChunkGenerator.cpp +++ b/source/cChunkGenerator.cpp @@ -117,6 +117,7 @@ void cChunkGenerator::InitBiomeGen(cIniFile & a_IniFile) EMCSBiome b = StringToBiome(Biome); if (b == -1) { + LOGWARN("[Generator]::ConstantBiome value \"%s\" not recognized, using \"Plains\".", Biome.c_str()); b = biPlains; } m_BiomeGen = new cBioGenConstant(b); @@ -163,12 +164,8 @@ void cChunkGenerator::InitHeightGen(cIniFile & a_IniFile) int Height = a_IniFile.GetValueI("Generator", "FlatHeight", 5); m_HeightGen = new cHeiGenFlat(Height); } - else // "classic" or + else if (NoCaseCompare(HeightGenName, "classic") == 0) { - if (NoCaseCompare(HeightGenName, "classic") != 0) - { - LOGWARN("Unknown HeightGen \"%s\", using \"classic\" instead.", HeightGenName.c_str()); - } // These used to be in terrain.ini, but now they are in world.ini (so that multiple worlds can have different values): float HeightFreq1 = (float)a_IniFile.GetValueF("Generator", "ClassicHeightFreq1", 0.1); float HeightFreq2 = (float)a_IniFile.GetValueF("Generator", "ClassicHeightFreq2", 1.0); @@ -178,6 +175,14 @@ void cChunkGenerator::InitHeightGen(cIniFile & a_IniFile) float HeightAmp3 = (float)a_IniFile.GetValueF("Generator", "ClassicHeightAmp3", 0.5); m_HeightGen = new cHeiGenClassic(m_Seed, HeightFreq1, HeightAmp1, HeightFreq2, HeightAmp2, HeightFreq3, HeightAmp3); } + else // "biomal" or + { + if (NoCaseCompare(HeightGenName, "biomal") != 0) + { + LOGWARN("Unknown HeightGen \"%s\", using \"Biomal\" instead.", HeightGenName.c_str()); + } + m_HeightGen = new cHeiGenBiomal(m_Seed, *m_BiomeGen); + } } -- cgit v1.2.3