1
0

Extreme Hills M biomes now generate gravel, stone and grass patterns.

This commit is contained in:
STRWarrior 2013-12-25 23:18:33 +01:00
parent e282eb73c8
commit b767fd784c

View File

@ -111,7 +111,7 @@ static cDistortedHeightmap::sBlockInfo tbGravel[] =
static cDistortedHeightmap::sBlockInfo tbStone[] =
{
{E_BLOCK_STONE, 0},
{E_BLOCK_STONE, 0},
{E_BLOCK_STONE, 0},
{E_BLOCK_STONE, 0},
{E_BLOCK_STONE, 0},
@ -769,7 +769,15 @@ void cDistortedHeightmap::ComposeColumn(cChunkDesc & a_ChunkDesc, int a_RelX, in
NOISE_DATATYPE NoiseX = ((NOISE_DATATYPE)(m_CurChunkX * cChunkDef::Width + a_RelX)) / FrequencyX;
NOISE_DATATYPE NoiseY = ((NOISE_DATATYPE)(m_CurChunkZ * cChunkDef::Width + a_RelZ)) / FrequencyZ;
NOISE_DATATYPE Val = m_OceanFloorSelect.CubicNoise2D(NoiseX, NoiseY);
const sBlockInfo * Pattern = (Val < -0.1) ? patGravel.Get() : patGrass.Get();
const sBlockInfo * Pattern;
if (Val <= 0.0)
{
Pattern = (Val < -0.3) ? patGravel.Get() : patGrass.Get();
}
else
{
Pattern = (Val < 0.3) ? patStone.Get() : patGrass.Get();
}
FillColumnPattern(a_ChunkDesc, a_RelX, a_RelZ, Pattern);
return;
}