From bb78bd88b568b8d9bce561f25c930c545c316622 Mon Sep 17 00:00:00 2001 From: Mattes D Date: Wed, 30 Nov 2016 14:04:27 +0100 Subject: Fixed villages generating under-water. The CompoGenBiomal didn't update the heightmap properly. --- src/Generating/VillageGen.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/Generating/VillageGen.cpp') diff --git a/src/Generating/VillageGen.cpp b/src/Generating/VillageGen.cpp index e0804625a..ccea3338d 100644 --- a/src/Generating/VillageGen.cpp +++ b/src/Generating/VillageGen.cpp @@ -234,13 +234,14 @@ protected: { for (int x = MinX; x <= MaxX; x++) { - if (IsBlockWater(a_Chunk.GetBlockType(x, cChunkDef::GetHeight(a_HeightMap, x, z), z))) + auto height = cChunkDef::GetHeight(a_HeightMap, x, z); + if (IsBlockWater(a_Chunk.GetBlockType(x, height, z))) { - a_Chunk.SetBlockTypeMeta(x, cChunkDef::GetHeight(a_HeightMap, x, z), z, WaterRoadBlockType, WaterRoadBlockMeta); + a_Chunk.SetBlockTypeMeta(x, height, z, WaterRoadBlockType, WaterRoadBlockMeta); } else { - a_Chunk.SetBlockTypeMeta(x, cChunkDef::GetHeight(a_HeightMap, x, z), z, RoadBlockType, RoadBlockMeta); + a_Chunk.SetBlockTypeMeta(x, height, z, RoadBlockType, RoadBlockMeta); } } } -- cgit v1.2.3