PreSimulator: Added configurations.
You can now choose if it should pregenerate something or not
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user