Ice finisher uses GetSnowStartHeight instead of specific biomes
This commit is contained in:
parent
ba3eaf9223
commit
ac2c88b451
@ -502,35 +502,28 @@ void cFinishGenIce::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);
|
||||
switch (a_ChunkDesc.GetBlockType(x, Height, z))
|
||||
if (GetSnowStartHeight(a_ChunkDesc.GetBiome(x, z)) > Height)
|
||||
{
|
||||
case E_BLOCK_WATER:
|
||||
case E_BLOCK_STATIONARY_WATER:
|
||||
// Height isn't high enough for snow to start forming.
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!IsBlockWater(a_ChunkDesc.GetBlockType(x, Height, z)))
|
||||
{
|
||||
// The block isn't a water block.
|
||||
continue;
|
||||
}
|
||||
|
||||
if (a_ChunkDesc.GetBlockMeta(x, Height, z) != 0)
|
||||
{
|
||||
// The water block isn't a source block.
|
||||
continue;
|
||||
}
|
||||
|
||||
a_ChunkDesc.SetBlockType(x, Height, z, E_BLOCK_ICE);
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
// No icy water in other biomes.
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} // for x
|
||||
} // for z
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user