From: Perttu Ahola Date: Fri, 3 Feb 2012 13:14:07 +0000 (+0200) Subject: Fix mapgen block_is_underground heuristic X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=17d51a16099ad03ca546ba192d3ea37db4b840f4;p=zefram%2Fminetest%2Fminetest_engine.git Fix mapgen block_is_underground heuristic --- diff --git a/src/mapgen.cpp b/src/mapgen.cpp index fd5851c9..0dfd6731 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