diff options
author | madmaxoft <github@xoft.cz> | 2014-03-28 16:42:32 +0100 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2014-03-28 16:42:32 +0100 |
commit | 5b7215ec24c2b835a0f1342cf1479f757084d1e2 (patch) | |
tree | 1969aec04072dc093a6bdf32c0aaa54fc63d765b /src/Generating/ComposableGenerator.cpp | |
parent | Merge branch 'howaner/GlobalFixes'. (diff) | |
download | cuberite-5b7215ec24c2b835a0f1342cf1479f757084d1e2.tar cuberite-5b7215ec24c2b835a0f1342cf1479f757084d1e2.tar.gz cuberite-5b7215ec24c2b835a0f1342cf1479f757084d1e2.tar.bz2 cuberite-5b7215ec24c2b835a0f1342cf1479f757084d1e2.tar.lz cuberite-5b7215ec24c2b835a0f1342cf1479f757084d1e2.tar.xz cuberite-5b7215ec24c2b835a0f1342cf1479f757084d1e2.tar.zst cuberite-5b7215ec24c2b835a0f1342cf1479f757084d1e2.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Generating/ComposableGenerator.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/Generating/ComposableGenerator.cpp b/src/Generating/ComposableGenerator.cpp index 6c00b5905..339f5709a 100644 --- a/src/Generating/ComposableGenerator.cpp +++ b/src/Generating/ComposableGenerator.cpp @@ -21,6 +21,7 @@ #include "DistortedHeightmap.h" #include "EndGen.h" #include "MineShafts.h" +#include "NetherFortGen.h" #include "Noise3DGenerator.h" #include "POCPieceGenerator.h" #include "Ravines.h" @@ -191,9 +192,11 @@ void cComposableGenerator::DoGenerate(int a_ChunkX, int a_ChunkZ, cChunkDesc & a m_HeightGen->GenHeightMap(a_ChunkX, a_ChunkZ, a_ChunkDesc.GetHeightMap()); } + bool ShouldUpdateHeightmap = false; if (a_ChunkDesc.IsUsingDefaultComposition()) { m_CompositionGen->ComposeTerrain(a_ChunkDesc); + ShouldUpdateHeightmap = true; } if (a_ChunkDesc.IsUsingDefaultFinish()) @@ -202,6 +205,12 @@ void cComposableGenerator::DoGenerate(int a_ChunkX, int a_ChunkZ, cChunkDesc & a { (*itr)->GenFinish(a_ChunkDesc); } // for itr - m_FinishGens[] + ShouldUpdateHeightmap = true; + } + + if (ShouldUpdateHeightmap) + { + a_ChunkDesc.UpdateHeightmap(); } } @@ -349,7 +358,7 @@ void cComposableGenerator::InitFinishGens(cIniFile & a_IniFile) int ChanceCrossing = a_IniFile.GetValueSetI("Generator", "MineShaftsChanceCrossing", 200); int ChanceStaircase = a_IniFile.GetValueSetI("Generator", "MineShaftsChanceStaircase", 200); m_FinishGens.push_back(new cStructGenMineShafts( - Seed, GridSize, MaxSystemSize, + Seed, GridSize, MaxSystemSize, ChanceCorridor, ChanceCrossing, ChanceStaircase )); } @@ -361,6 +370,12 @@ void cComposableGenerator::InitFinishGens(cIniFile & a_IniFile) { m_FinishGens.push_back(new cFinishGenNetherClumpFoliage(Seed)); } + else if (NoCaseCompare(*itr, "NetherForts") == 0) + { + int GridSize = a_IniFile.GetValueSetI("Generator", "NetherFortsGridSize", 512); + int MaxDepth = a_IniFile.GetValueSetI("Generator", "NetherFortsMaxDepth", 6); + m_FinishGens.push_back(new cNetherFortGen(Seed, GridSize, MaxDepth)); + } else if (NoCaseCompare(*itr, "OreNests") == 0) { m_FinishGens.push_back(new cStructGenOreNests(Seed)); |