Snow finisher uses GetSnowStartHeight instead of specific biomes
This commit is contained in:
parent
b3f0751130
commit
ba3eaf9223
@ -469,31 +469,23 @@ void cFinishGenSnow::GenFinish(cChunkDesc & a_ChunkDesc)
|
||||
for (int z = 0; z < cChunkDef::Width; z++)
|
||||
{
|
||||
for (int x = 0; x < cChunkDef::Width; x++)
|
||||
{
|
||||
switch (a_ChunkDesc.GetBiome(x, z))
|
||||
{
|
||||
case biIcePlains:
|
||||
case biIceMountains:
|
||||
case biTaiga:
|
||||
case biTaigaHills:
|
||||
case biFrozenRiver:
|
||||
case biFrozenOcean:
|
||||
{
|
||||
int Height = a_ChunkDesc.GetHeight(x, z);
|
||||
if (cBlockInfo::IsSnowable(a_ChunkDesc.GetBlockType(x, Height, z)) && (Height < cChunkDef::Height - 1))
|
||||
if (GetSnowStartHeight(a_ChunkDesc.GetBiome(x, z)) > Height)
|
||||
{
|
||||
// Height isn't high enough for snow to start forming.
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!cBlockInfo::IsSnowable(a_ChunkDesc.GetBlockType(x, Height, z)) && (Height < cChunkDef::Height - 1))
|
||||
{
|
||||
// The top block can't be snown over.
|
||||
continue;
|
||||
}
|
||||
|
||||
a_ChunkDesc.SetBlockType(x, Height + 1, z, E_BLOCK_SNOW);
|
||||
a_ChunkDesc.SetHeight(x, z, Height + 1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
// There's no snow in the other biomes.
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} // for x
|
||||
} // for z
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user