diff options
author | Paramat <paramat@users.noreply.github.com> | 2019-10-13 00:18:23 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-13 00:18:23 +0100 |
commit | 47d07793654c1bdd92afbcb486e1ff1429f29a8f (patch) | |
tree | fd124d210d81ac87ac05e5a7a98b84da9dba2611 /src/mapgen | |
parent | 69a2099c04527404f2d0942f2088b3d22dd75b5a (diff) | |
download | minetest-47d07793654c1bdd92afbcb486e1ff1429f29a8f.tar.gz minetest-47d07793654c1bdd92afbcb486e1ff1429f29a8f.tar.bz2 minetest-47d07793654c1bdd92afbcb486e1ff1429f29a8f.zip |
Randomwalk caves: Reduce 'insure' value from 10 to 2 (#9035)
This value reduces how far randomwalk caves can extend into the
mapchunk padding, to avoid 'out of voxelmanip' cave nodes which cause
flattened cave walls.
Testing shows that a value of 2 (instead of 10) is enough to make
'out of area' nodes extremely rare.
Reducing this value results in a higher chance of overlap and
connection with caves of neighbour mapchunks.
Diffstat (limited to 'src/mapgen')
-rw-r--r-- | src/mapgen/cavegen.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mapgen/cavegen.cpp b/src/mapgen/cavegen.cpp index fa34b7273..21540d7ce 100644 --- a/src/mapgen/cavegen.cpp +++ b/src/mapgen/cavegen.cpp @@ -364,9 +364,8 @@ void CavesRandomWalk::makeCave(MMVManip *vm, v3s16 nmin, v3s16 nmax, // Area starting point in nodes of = node_min; - // Allow a bit more - //(this should be more than the maximum radius of the tunnel) - const s16 insure = 10; + // Allow a bit more (this should be more than the maximum radius of the tunnel) + const s16 insure = 2; s16 more = MYMAX(MAP_BLOCKSIZE - max_tunnel_diameter / 2 - insure, 1); ar += v3s16(1, 0, 1) * more * 2; of -= v3s16(1, 0, 1) * more; |