Weather: Snow starts forming when the top block is at the right height or higher
This commit is contained in:
parent
f1f23b09ae
commit
b3f0751130
@ -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)
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user