Skip to content

Commit f1aea6b

Browse files
committedMar 19, 2016
Mgv7: Limit pseudorandom caves to surface mapchunk or below
To avoid bright caves at mapchunk borders when generating mapchunks upwards
1 parent c5c727d commit f1aea6b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed
 

Diff for: ‎src/mapgen_v7.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -912,6 +912,9 @@ void MapgenV7::generateCaves(s16 max_stone_y)
912912
}
913913
}
914914

915+
if (node_min.Y >= water_level)
916+
return;
917+
915918
PseudoRandom ps(blockseed + 21343);
916919
u32 bruises_count = ps.range(0, 2);
917920
for (u32 i = 0; i < bruises_count; i++) {

0 commit comments

Comments
 (0)