1
0

Fixed villages generating under-water.

The CompoGenBiomal didn't update the heightmap properly.
This commit is contained in:
Mattes D
2016-11-30 14:04:27 +01:00
parent 26a349b4f5
commit bb78bd88b5
2 changed files with 10 additions and 4 deletions

View File

@@ -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);
}
}
}