summaryrefslogtreecommitdiffstats
path: root/src/Generating/FinishGen.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-07-30 13:41:02 +0200
committerMattes D <github@xoft.cz>2014-07-30 13:41:02 +0200
commita899dfc26e0990e01669d17beff9114e27cb1327 (patch)
treea95287760ecf9f14bea09fed86cbc024be0937b2 /src/Generating/FinishGen.cpp
parentMerged branch 'howaner/Options'. (diff)
parentPreSimulator: Added configurations. (diff)
downloadcuberite-a899dfc26e0990e01669d17beff9114e27cb1327.tar
cuberite-a899dfc26e0990e01669d17beff9114e27cb1327.tar.gz
cuberite-a899dfc26e0990e01669d17beff9114e27cb1327.tar.bz2
cuberite-a899dfc26e0990e01669d17beff9114e27cb1327.tar.lz
cuberite-a899dfc26e0990e01669d17beff9114e27cb1327.tar.xz
cuberite-a899dfc26e0990e01669d17beff9114e27cb1327.tar.zst
cuberite-a899dfc26e0990e01669d17beff9114e27cb1327.zip
Diffstat (limited to '')
-rw-r--r--src/Generating/FinishGen.cpp22
1 files changed, 18 insertions, 4 deletions
diff --git a/src/Generating/FinishGen.cpp b/src/Generating/FinishGen.cpp
index f53addb68..e8324095e 100644
--- a/src/Generating/FinishGen.cpp
+++ b/src/Generating/FinishGen.cpp
@@ -555,7 +555,10 @@ void cFinishGenBottomLava::GenFinish(cChunkDesc & a_ChunkDesc)
////////////////////////////////////////////////////////////////////////////////
// cFinishGenPreSimulator:
-cFinishGenPreSimulator::cFinishGenPreSimulator(void)
+cFinishGenPreSimulator::cFinishGenPreSimulator(bool a_PreSimulateFallingBlocks, bool a_PreSimulateWater, bool a_PreSimulateLava) :
+ m_PreSimulateFallingBlocks(a_PreSimulateFallingBlocks),
+ m_PreSimulateWater(a_PreSimulateWater),
+ m_PreSimulateLava(a_PreSimulateLava)
{
// Nothing needed yet
}
@@ -566,9 +569,20 @@ cFinishGenPreSimulator::cFinishGenPreSimulator(void)
void cFinishGenPreSimulator::GenFinish(cChunkDesc & a_ChunkDesc)
{
- CollapseSandGravel(a_ChunkDesc.GetBlockTypes(), a_ChunkDesc.GetHeightMap());
- StationarizeFluid(a_ChunkDesc.GetBlockTypes(), a_ChunkDesc.GetHeightMap(), E_BLOCK_WATER, E_BLOCK_STATIONARY_WATER);
- StationarizeFluid(a_ChunkDesc.GetBlockTypes(), a_ChunkDesc.GetHeightMap(), E_BLOCK_LAVA, E_BLOCK_STATIONARY_LAVA);
+ if (m_PreSimulateFallingBlocks)
+ {
+ CollapseSandGravel(a_ChunkDesc.GetBlockTypes(), a_ChunkDesc.GetHeightMap());
+ }
+
+ if (m_PreSimulateWater)
+ {
+ StationarizeFluid(a_ChunkDesc.GetBlockTypes(), a_ChunkDesc.GetHeightMap(), E_BLOCK_WATER, E_BLOCK_STATIONARY_WATER);
+ }
+
+ if (m_PreSimulateLava)
+ {
+ StationarizeFluid(a_ChunkDesc.GetBlockTypes(), a_ChunkDesc.GetHeightMap(), E_BLOCK_LAVA, E_BLOCK_STATIONARY_LAVA);
+ }
// TODO: other operations
}