Skip to content

Commit cca9253

Browse files
authoredApr 17, 2018
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'.
1 parent 574dab5 commit cca9253

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed
 

‎src/mapgen/cavegen.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ void CavesRandomWalk::makeCave(MMVManip *vm, v3s16 nmin, v3s16 nmax,
355355

356356
route_y_min = 0;
357357
// Allow half a diameter + 7 over stone surface
358-
route_y_max = -of.Y + max_stone_y + max_tunnel_diameter / 2 + 7;
358+
route_y_max = -of.Y + max_stone_height + max_tunnel_diameter / 2 + 7;
359359

360360
// Limit maximum to area
361361
route_y_max = rangelim(route_y_max, 0, ar.Y - 1);

‎src/mapgen/cavegen.h

-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,6 @@ class CavesRandomWalk
134134
bool large_cave_is_flat;
135135
bool flooded;
136136

137-
s16 max_stone_y;
138137
v3s16 node_min;
139138
v3s16 node_max;
140139

0 commit comments

Comments
 (0)
Please sign in to comment.