Fixed villages generating under-water.
The CompoGenBiomal didn't update the heightmap properly.
This commit is contained in:
parent
26a349b4f5
commit
bb78bd88b5
@ -435,7 +435,12 @@ protected:
|
|||||||
{
|
{
|
||||||
bool HasHadWater = false;
|
bool HasHadWater = false;
|
||||||
int PatternIdx = 0;
|
int PatternIdx = 0;
|
||||||
HEIGHTTYPE top = std::max(m_SeaLevel, a_ChunkDesc.GetHeight(a_RelX, a_RelZ));
|
HEIGHTTYPE top = a_ChunkDesc.GetHeight(a_RelX, a_RelZ);
|
||||||
|
if (top < m_SeaLevel)
|
||||||
|
{
|
||||||
|
top = m_SeaLevel;
|
||||||
|
a_ChunkDesc.SetHeight(a_RelX, a_RelZ, top - 1);
|
||||||
|
}
|
||||||
for (int y = top; y > 0; y--)
|
for (int y = top; y > 0; y--)
|
||||||
{
|
{
|
||||||
if (a_ShapeColumn[y] > 0)
|
if (a_ShapeColumn[y] > 0)
|
||||||
|
@ -234,13 +234,14 @@ protected:
|
|||||||
{
|
{
|
||||||
for (int x = MinX; x <= MaxX; x++)
|
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
|
else
|
||||||
{
|
{
|
||||||
a_Chunk.SetBlockTypeMeta(x, cChunkDef::GetHeight(a_HeightMap, x, z), z, RoadBlockType, RoadBlockMeta);
|
a_Chunk.SetBlockTypeMeta(x, height, z, RoadBlockType, RoadBlockMeta);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user