Fix deep ground cave generation a bit

This commit is contained in:
Perttu Ahola 2012-02-03 15:19:05 +02:00
parent 17d51a1609
commit 66bf7b0b01
1 changed files with 6 additions and 4 deletions

View File

@ -1416,12 +1416,14 @@ void make_block(BlockMakeData *data)
u32 i = vmanip.m_area.index(v3s16(p2d.X, node_min.Y, p2d.Y)); u32 i = vmanip.m_area.index(v3s16(p2d.X, node_min.Y, p2d.Y));
for(s16 y=node_min.Y; y<=node_max.Y; y++) for(s16 y=node_min.Y; y<=node_max.Y; y++)
{ {
if(y <= surface_y) if(y <= surface_y){
if(vmanip.m_data[i].getContent() == CONTENT_IGNORE)
vmanip.m_data[i] = MapNode(c_stone); vmanip.m_data[i] = MapNode(c_stone);
else if(y <= WATER_LEVEL) } else if(y <= WATER_LEVEL){
vmanip.m_data[i] = MapNode(c_water_source); vmanip.m_data[i] = MapNode(c_water_source);
else } else {
vmanip.m_data[i] = MapNode(c_air); vmanip.m_data[i] = MapNode(c_air);
}
vmanip.m_area.add_y(em, i, 1); vmanip.m_area.add_y(em, i, 1);
} }