mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 16:45:20 +02:00
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.
This commit is contained in:
@@ -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,
|
||||
|
Reference in New Issue
Block a user