From 9794f8ddcb1ae19027eeb6d468b33a3c11c37cfb Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Sat, 27 Apr 2013 21:01:45 +0000 Subject: 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 --- source/Generating/Noise3DGenerator.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source') diff --git a/source/Generating/Noise3DGenerator.cpp b/source/Generating/Noise3DGenerator.cpp index d8ba5f690..4211f9529 100644 --- a/source/Generating/Noise3DGenerator.cpp +++ b/source/Generating/Noise3DGenerator.cpp @@ -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) -- cgit v1.2.3