1
0

Snow generator: Fixed failure at top of the world.

This commit is contained in:
Mattes D 2014-11-15 20:24:15 +01:00
parent 889aa7404d
commit b0bcd75732

View File

@ -412,7 +412,7 @@ void cFinishGenSnow::GenFinish(cChunkDesc & a_ChunkDesc)
case biFrozenOcean:
{
int Height = a_ChunkDesc.GetHeight(x, z);
if (cBlockInfo::IsSnowable(a_ChunkDesc.GetBlockType(x, Height, z)))
if (cBlockInfo::IsSnowable(a_ChunkDesc.GetBlockType(x, Height, z)) && (Height < cChunkDef::Height - 1))
{
a_ChunkDesc.SetBlockType(x, Height + 1, z, E_BLOCK_SNOW);
a_ChunkDesc.SetHeight(x, z, Height + 1);