Skip to content

Commit

Permalink
Cavegen: Fix variable typo that broke mgvalleys large cave distributi…
Browse files Browse the repository at this point in the history
…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 cca9253
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion src/mapgen/cavegen.cpp
Expand Up @@ -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);
Expand Down
1 change: 0 additions & 1 deletion src/mapgen/cavegen.h
Expand Up @@ -134,7 +134,6 @@ class CavesRandomWalk
bool large_cave_is_flat;
bool flooded;

s16 max_stone_y;
v3s16 node_min;
v3s16 node_max;

Expand Down

0 comments on commit cca9253

Please sign in to comment.