Skip to content
Permalink
Browse files

Cavegen: Fix variable typo that broke mgvalleys large cave distributi…

…on (#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'.
  • Loading branch information
paramat committed Apr 17, 2018
1 parent 574dab5 commit cca925377b7929276de3bb04553ca6ee2012d35d
Showing with 1 addition and 2 deletions.
  1. +1 −1 src/mapgen/cavegen.cpp
  2. +0 −1 src/mapgen/cavegen.h
@@ -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);
@@ -134,7 +134,6 @@ class CavesRandomWalk
bool large_cave_is_flat;
bool flooded;

s16 max_stone_y;
v3s16 node_min;
v3s16 node_max;

0 comments on commit cca9253

Please sign in to comment.