aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2012-02-03 15:14:07 +0200
committerPerttu Ahola <celeron55@gmail.com>2012-03-27 19:09:07 +0300
commit17d51a16099ad03ca546ba192d3ea37db4b840f4 (patch)
treed1abd8bbf673766ffabd34ec0ac1376a568b91ce /src
parent0a59605e0529f6e12bd5bdf07969643c2311e62a (diff)
downloadminetest-17d51a16099ad03ca546ba192d3ea37db4b840f4.tar.gz
minetest-17d51a16099ad03ca546ba192d3ea37db4b840f4.tar.bz2
minetest-17d51a16099ad03ca546ba192d3ea37db4b840f4.zip
Fix mapgen block_is_underground heuristic
Diffstat (limited to 'src')
-rw-r--r--src/mapgen.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/mapgen.cpp b/src/mapgen.cpp
index fd5851c98..0dfd67312 100644
--- a/src/mapgen.cpp
+++ b/src/mapgen.cpp
@@ -1328,9 +1328,7 @@ void make_block(BlockMakeData *data)
//double gen_area_nodes = MAP_BLOCKSIZE*MAP_BLOCKSIZE * rel_volume;
// Horribly wrong heuristic, but better than nothing
- bool block_is_underground = (WATER_LEVEL /* local minimum ground level */ >
- MAP_BLOCKSIZE * (data->blockpos_max.X
- - data->blockpos_min.X + 1) / 2);
+ bool block_is_underground = (WATER_LEVEL > node_max.Y);
/*
Create a block-specific seed