Merge branch 'master' into IniFileFix
This commit is contained in:
commit
37025fca77
@ -509,6 +509,7 @@ void cCaveTunnel::ProcessChunk(
|
||||
case E_BLOCK_GRAVEL:
|
||||
case E_BLOCK_SAND:
|
||||
case E_BLOCK_SANDSTONE:
|
||||
case E_BLOCK_SOULSAND:
|
||||
case E_BLOCK_NETHERRACK:
|
||||
case E_BLOCK_COAL_ORE:
|
||||
case E_BLOCK_IRON_ORE:
|
||||
|
@ -589,7 +589,22 @@ void cCompoGenNether::ComposeTerrain(cChunkDesc & a_ChunkDesc)
|
||||
for (int y = 0; y < SEGMENT_HEIGHT; y++)
|
||||
{
|
||||
int Val = Lo + (Hi - Lo) * y / SEGMENT_HEIGHT;
|
||||
a_ChunkDesc.SetBlockType(x, y + Segment, z, (Val < m_Threshold) ? E_BLOCK_NETHERRACK : E_BLOCK_AIR);
|
||||
BLOCKTYPE Block = E_BLOCK_AIR;
|
||||
if (Val < m_Threshold) // Don't calculate if the block should be Netherrack or Soulsand when it's already decided that it's air.
|
||||
{
|
||||
NOISE_DATATYPE NoiseX = ((NOISE_DATATYPE)(BaseX + x)) / 8;
|
||||
NOISE_DATATYPE NoiseY = ((NOISE_DATATYPE)(BaseZ + z)) / 8;
|
||||
NOISE_DATATYPE CompBlock = m_Noise1.CubicNoise3D(NoiseX, (float) (y + Segment) / 2, NoiseY);
|
||||
if (CompBlock < -0.5)
|
||||
{
|
||||
Block = E_BLOCK_SOULSAND;
|
||||
}
|
||||
else
|
||||
{
|
||||
Block = E_BLOCK_NETHERRACK;
|
||||
}
|
||||
}
|
||||
a_ChunkDesc.SetBlockType(x, y + Segment, z, Block);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -90,7 +90,8 @@ cTerrainCompositionGen * cTerrainCompositionGen::CreateCompositionGen(cIniFile &
|
||||
}
|
||||
else
|
||||
{
|
||||
LOGWARN("Unknown CompositionGen \"%s\", using \"biomal\" instead.", CompoGenName.c_str());
|
||||
LOGWARN("Unknown CompositionGen \"%s\", using \"Biomal\" instead.", CompoGenName.c_str());
|
||||
a_IniFile.DeleteValue("Generator", "CompositionGen");
|
||||
a_IniFile.SetValue("Generator", "CompositionGen", "Biomal");
|
||||
return CreateCompositionGen(a_IniFile, a_BiomeGen, a_HeightGen, a_Seed);
|
||||
}
|
||||
|
@ -72,6 +72,7 @@ cTerrainHeightGen * cTerrainHeightGen::CreateHeightGen(cIniFile &a_IniFile, cBio
|
||||
{
|
||||
// No match found, force-set the default and retry
|
||||
LOGWARN("Unknown HeightGen \"%s\", using \"Biomal\" instead.", HeightGenName.c_str());
|
||||
a_IniFile.DeleteValue("Generator", "HeightGen");
|
||||
a_IniFile.SetValue("Generator", "HeightGen", "Biomal");
|
||||
return CreateHeightGen(a_IniFile, a_BiomeGen, a_Seed, a_CacheOffByDefault);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user