From 66bf7b0b01d3dcff4c318d44c7bb58dba975c131 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Fri, 3 Feb 2012 15:19:05 +0200 Subject: [PATCH] Fix deep ground cave generation a bit --- src/mapgen.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/mapgen.cpp b/src/mapgen.cpp index 0dfd6731..c6893eed 100644 --- a/src/mapgen.cpp +++ b/src/mapgen.cpp @@ -1416,12 +1416,14 @@ void make_block(BlockMakeData *data) 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++) { - if(y <= surface_y) - vmanip.m_data[i] = MapNode(c_stone); - else if(y <= WATER_LEVEL) + if(y <= surface_y){ + if(vmanip.m_data[i].getContent() == CONTENT_IGNORE) + vmanip.m_data[i] = MapNode(c_stone); + } else if(y <= WATER_LEVEL){ vmanip.m_data[i] = MapNode(c_water_source); - else + } else { vmanip.m_data[i] = MapNode(c_air); + } vmanip.m_area.add_y(em, i, 1); } -- 2.30.2