From: paramat Date: Tue, 15 Mar 2016 17:28:29 +0000 (+0000) Subject: Mgv7: Limit pseudorandom caves to surface mapchunk or below X-Git-Tag: 0.4.14~162 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=f1aea6b4ff7a3bcd0227527f3fd4c1a29fc89fe4;p=oweals%2Fminetest.git Mgv7: Limit pseudorandom caves to surface mapchunk or below To avoid bright caves at mapchunk borders when generating mapchunks upwards --- diff --git a/src/mapgen_v7.cpp b/src/mapgen_v7.cpp index 24867623c..9e3e3f1a8 100644 --- a/src/mapgen_v7.cpp +++ b/src/mapgen_v7.cpp @@ -912,6 +912,9 @@ void MapgenV7::generateCaves(s16 max_stone_y) } } + if (node_min.Y >= water_level) + return; + PseudoRandom ps(blockseed + 21343); u32 bruises_count = ps.range(0, 2); for (u32 i = 0; i < bruises_count; i++) {