From 4dc72fe00b66ef7d55458f7753a186d83771222b Mon Sep 17 00:00:00 2001 From: peterbell10 Date: Sat, 27 May 2017 13:27:31 +0100 Subject: Remove redundant heighmap code --- src/Generating/StructGen.cpp | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) (limited to 'src/Generating/StructGen.cpp') diff --git a/src/Generating/StructGen.cpp b/src/Generating/StructGen.cpp index c1e6906fc..3e2ab8855 100644 --- a/src/Generating/StructGen.cpp +++ b/src/Generating/StructGen.cpp @@ -67,21 +67,7 @@ void cStructGenTrees::GenFinish(cChunkDesc & a_ChunkDesc) } // for z } // for x - // Update the heightmap: - for (int x = 0; x < cChunkDef::Width; x++) - { - for (int z = 0; z < cChunkDef::Width; z++) - { - 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 z - } // for x + a_ChunkDesc.UpdateHeightmap(); } -- cgit v1.2.3