1
0

Noise3D: Fixed composition when reusing the buffer (caused chopped trees)

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1420 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
madmaxoft@gmail.com 2013-04-27 21:01:45 +00:00
parent ac8db4d16b
commit 9794f8ddcb

View File

@ -479,6 +479,10 @@ void cNoise3DComposable::ComposeTerrain(cChunkDesc & a_ChunkDesc)
{
int LastAir = a_ChunkDesc.GetHeight(x, z) + 1;
bool HasHadWater = false;
for (int y = LastAir; y < cChunkDef::Height; y++)
{
a_ChunkDesc.SetBlockType(x, y, z, E_BLOCK_AIR);
}
for (int y = LastAir - 1; y > 0; y--)
{
if (m_NoiseArray[x + 17 * z + 17 * 17 * y] > m_AirThreshold)