Fix mapgen block_is_underground heuristic
authorPerttu Ahola <celeron55@gmail.com>
Fri, 3 Feb 2012 13:14:07 +0000 (15:14 +0200)
committerPerttu Ahola <celeron55@gmail.com>
Tue, 27 Mar 2012 16:09:07 +0000 (19:09 +0300)
src/mapgen.cpp

index fd5851c9816df7e00a952d1fcb8e9467463c76c9..0dfd6731212cac0f98adc0adcb86ce9db30e4e94 100644 (file)
@@ -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