summaryrefslogtreecommitdiff
path: root/src/mapgen_v7.cpp
diff options
context:
space:
mode:
authorparamat <mat.gregory@virginmedia.com>2017-05-11 03:39:43 +0100
committerparamat <mat.gregory@virginmedia.com>2017-05-16 21:56:51 +0100
commitfd32005b0f886450ada99f36460c1de58b6a832b (patch)
tree2d979dd491c912643c797abb1461ea0eb9f94b22 /src/mapgen_v7.cpp
parent582ee15d8e861efb9cc843963a95c087dae91bcc (diff)
downloadminetest-fd32005b0f886450ada99f36460c1de58b6a832b.tar.gz
minetest-fd32005b0f886450ada99f36460c1de58b6a832b.tar.bz2
minetest-fd32005b0f886450ada99f36460c1de58b6a832b.zip
Caverns: Remove unnecessary liquid excavation
Also disable CavesRandomWalk at a safer distance from caverns. Excavating liquids in cavern code is unnecessary as in practice we are already successfully disabling the generation of liquid caves that could intersect with caverns and cause excessive amounts of spreading liquids in caverns. However to be safer this commit now disables liquid caves at a larger distance from caverns, to compensate for liquid caves being able to generate up to a mapblock beyond a mapchunk border. Not excavating liquids in cavern code also allows a feature i am working on in experimental new core mapgens, but also allows for more flexibility in future.
Diffstat (limited to 'src/mapgen_v7.cpp')
-rw-r--r--src/mapgen_v7.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mapgen_v7.cpp b/src/mapgen_v7.cpp
index 420d77185..dbf2b02ae 100644
--- a/src/mapgen_v7.cpp
+++ b/src/mapgen_v7.cpp
@@ -292,12 +292,12 @@ void MapgenV7::makeChunk(BlockMakeData *data)
// Generate caverns, tunnels and classic caves
if (flags & MG_CAVES) {
- bool has_cavern = false;
+ bool near_cavern = false;
// Generate caverns
if (spflags & MGV7_CAVERNS)
- has_cavern = generateCaverns(stone_surface_max_y);
+ near_cavern = generateCaverns(stone_surface_max_y);
// Generate tunnels and classic caves
- if (has_cavern)
+ if (near_cavern)
// Disable classic caves in this mapchunk by setting
// 'large cave depth' to world base. Avoids excessive liquid in
// large caverns and floating blobs of overgenerated liquid.