From 29a4a8e5af53dfbf1cbec14de4cbe8d807223e1c Mon Sep 17 00:00:00 2001 From: Paramat Date: Sat, 9 Nov 2019 02:09:52 +0000 Subject: Tunnels: Completely disable generation when 'cave width' >= 10.0 (#9093) Previously, the only way to disable the 3D noise tunnels was to set 'cave width' > 1.0, however doing so did not disable the very intensive noise calculations or the generation loop. All the other types of cave generation (randomwalk caves, caverns) can already be independently and completely disabled. This feature is now needed more because the small randomwalk caves are now available for use as an alternative to the 3D noise tunnels. --- src/mapgen/mapgen.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/mapgen/mapgen.cpp b/src/mapgen/mapgen.cpp index a1ac7a5ca..bd074d158 100644 --- a/src/mapgen/mapgen.cpp +++ b/src/mapgen/mapgen.cpp @@ -831,7 +831,9 @@ void MapgenBasic::dustTopNodes() void MapgenBasic::generateCavesNoiseIntersection(s16 max_stone_y) { - if (node_min.Y > max_stone_y) + // cave_width >= 10 is used to disable generation and avoid the intensive + // 3D noise calculations. Tunnels already have zero width when cave_width > 1. + if (node_min.Y > max_stone_y || cave_width >= 10.0f) return; CavesNoiseIntersection caves_noise(ndef, m_bmgr, csize, -- cgit v1.2.3