diff options
Diffstat (limited to 'src/Generating/Noise3DGenerator.cpp')
-rw-r--r-- | src/Generating/Noise3DGenerator.cpp | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/src/Generating/Noise3DGenerator.cpp b/src/Generating/Noise3DGenerator.cpp index 54b65722f..114fc953e 100644 --- a/src/Generating/Noise3DGenerator.cpp +++ b/src/Generating/Noise3DGenerator.cpp @@ -236,7 +236,7 @@ void cNoise3DGenerator::DoGenerate(int a_ChunkX, int a_ChunkZ, cChunkDesc & a_Ch } } - UpdateHeightmap(a_ChunkDesc); + a_ChunkDesc.UpdateHeightmap(); ComposeTerrain (a_ChunkDesc); } @@ -299,28 +299,6 @@ void cNoise3DGenerator::GenerateNoiseArray(int a_ChunkX, int a_ChunkZ, NOISE_DAT -void cNoise3DGenerator::UpdateHeightmap(cChunkDesc & a_ChunkDesc) -{ - for (int z = 0; z < cChunkDef::Width; z++) - { - for (int x = 0; x < cChunkDef::Width; x++) - { - for (HEIGHTTYPE y = cChunkDef::Height - 1; y > 0; y--) - { - if (a_ChunkDesc.GetBlockType(x, y, z) != E_BLOCK_AIR) - { - a_ChunkDesc.SetHeight(x, z, y); - break; - } - } // for y - } // for x - } // for z -} - - - - - void cNoise3DGenerator::ComposeTerrain(cChunkDesc & a_ChunkDesc) { // Make basic terrain composition: |