1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00: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:
Paramat 2019-11-09 02:09:52 +00:00 committed by GitHub
parent d11bfa3ef5
commit 29a4a8e5af
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 1 deletions

View file

@ -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,