summaryrefslogtreecommitdiff
path: root/src/mapgen
diff options
context:
space:
mode:
authorParamat <paramat@users.noreply.github.com>2018-04-17 22:25:59 +0100
committerGitHub <noreply@github.com>2018-04-17 22:25:59 +0100
commitcca925377b7929276de3bb04553ca6ee2012d35d (patch)
tree43e79188f071a91a47c64e25d6030533c5289cb5 /src/mapgen
parent574dab5c1195f7ce30cf9b59950a229a953fd59f (diff)
downloadminetest-cca925377b7929276de3bb04553ca6ee2012d35d.tar.gz
minetest-cca925377b7929276de3bb04553ca6ee2012d35d.tar.bz2
minetest-cca925377b7929276de3bb04553ca6ee2012d35d.zip
Cavegen: Fix variable typo that broke mgvalleys large cave distribution (#7249)
Fix elusive 5 year old bug that caused mgvalleys large caves to be flat and limited to mapchunk borders. Error was fixed 2 years ago in 'CavesV6' but not in 'CavesRandomWalk'.
Diffstat (limited to 'src/mapgen')
-rw-r--r--src/mapgen/cavegen.cpp2
-rw-r--r--src/mapgen/cavegen.h1
2 files changed, 1 insertions, 2 deletions
diff --git a/src/mapgen/cavegen.cpp b/src/mapgen/cavegen.cpp
index a54d5139d..0b49f653f 100644
--- a/src/mapgen/cavegen.cpp
+++ b/src/mapgen/cavegen.cpp
@@ -355,7 +355,7 @@ void CavesRandomWalk::makeCave(MMVManip *vm, v3s16 nmin, v3s16 nmax,
route_y_min = 0;
// Allow half a diameter + 7 over stone surface
- route_y_max = -of.Y + max_stone_y + max_tunnel_diameter / 2 + 7;
+ route_y_max = -of.Y + max_stone_height + max_tunnel_diameter / 2 + 7;
// Limit maximum to area
route_y_max = rangelim(route_y_max, 0, ar.Y - 1);
diff --git a/src/mapgen/cavegen.h b/src/mapgen/cavegen.h
index ff2923dc4..7b7be6219 100644
--- a/src/mapgen/cavegen.h
+++ b/src/mapgen/cavegen.h
@@ -134,7 +134,6 @@ public:
bool large_cave_is_flat;
bool flooded;
- s16 max_stone_y;
v3s16 node_min;
v3s16 node_max;