aboutsummaryrefslogtreecommitdiff
path: root/src/mapgen.cpp
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2012-02-03 15:19:05 +0200
committerPerttu Ahola <celeron55@gmail.com>2012-03-27 19:09:08 +0300
commit66bf7b0b01d3dcff4c318d44c7bb58dba975c131 (patch)
tree403c6867e02b5bdf1939c87d1950bf7f772eb882 /src/mapgen.cpp
parent17d51a16099ad03ca546ba192d3ea37db4b840f4 (diff)
downloadminetest-66bf7b0b01d3dcff4c318d44c7bb58dba975c131.tar.gz
minetest-66bf7b0b01d3dcff4c318d44c7bb58dba975c131.tar.bz2
minetest-66bf7b0b01d3dcff4c318d44c7bb58dba975c131.zip
Fix deep ground cave generation a bit
Diffstat (limited to 'src/mapgen.cpp')
-rw-r--r--src/mapgen.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/mapgen.cpp b/src/mapgen.cpp
index 0dfd67312..c6893eed7 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);
}