aboutsummaryrefslogtreecommitdiff
path: root/src/mapgen_v7.cpp
diff options
context:
space:
mode:
authorparamat <mat.gregory@virginmedia.com>2016-03-15 17:28:29 +0000
committerparamat <mat.gregory@virginmedia.com>2016-03-19 17:56:35 +0000
commitf1aea6b4ff7a3bcd0227527f3fd4c1a29fc89fe4 (patch)
tree1b2eb9d8333adbb20e6021bec523fecead48af6f /src/mapgen_v7.cpp
parentc5c727d62735e334ec64f07c557a2896d6d66d9f (diff)
downloadminetest-f1aea6b4ff7a3bcd0227527f3fd4c1a29fc89fe4.tar.gz
minetest-f1aea6b4ff7a3bcd0227527f3fd4c1a29fc89fe4.tar.bz2
minetest-f1aea6b4ff7a3bcd0227527f3fd4c1a29fc89fe4.zip
Mgv7: Limit pseudorandom caves to surface mapchunk or below
To avoid bright caves at mapchunk borders when generating mapchunks upwards
Diffstat (limited to 'src/mapgen_v7.cpp')
-rw-r--r--src/mapgen_v7.cpp3
1 files changed, 3 insertions, 0 deletions
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++) {