1
0

Weather: Snow starts forming when the top block is at the right height or higher

This commit is contained in:
STRWarrior 2015-02-25 19:02:08 +01:00
parent f1f23b09ae
commit b3f0751130

View File

@ -874,17 +874,15 @@ void cChunk::ApplyWeatherToTop()
int X = m_World->GetTickRandomNumber(15);
int Z = m_World->GetTickRandomNumber(15);
switch (GetBiomeAt(X, Z))
{
case biTaiga:
case biFrozenOcean:
case biFrozenRiver:
case biIcePlains:
case biIceMountains:
case biTaigaHills:
{
// TODO: Check light levels, don't snow over when the BlockLight is higher than (7?)
int Height = GetHeight(X, Z);
if (GetSnowStartHeight(GetBiomeAt(X, Z)) > Height)
{
return;
}
BLOCKTYPE TopBlock = GetBlock(X, Height, Z);
NIBBLETYPE TopMeta = GetMeta (X, Height, Z);
if (m_World->IsDeepSnowEnabled() && (TopBlock == E_BLOCK_SNOW))
@ -941,13 +939,6 @@ void cChunk::ApplyWeatherToTop()
{
SetBlock(X, Height, Z, E_BLOCK_SNOW, 0);
}
break;
} // case (snowy biomes)
default:
{
break;
}
} // switch (biome)
}