mirror of
https://github.com/moparisthebest/minetest
synced 2024-12-22 15:48:48 -05:00
Mgv7: Limit pseudorandom caves to surface mapchunk or below
To avoid bright caves at mapchunk borders when generating mapchunks upwards
This commit is contained in:
parent
c5c727d627
commit
f1aea6b4ff
@ -912,6 +912,9 @@ void MapgenV7::generateCaves(s16 max_stone_y)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (node_min.Y >= water_level)
|
||||||
|
return;
|
||||||
|
|
||||||
PseudoRandom ps(blockseed + 21343);
|
PseudoRandom ps(blockseed + 21343);
|
||||||
u32 bruises_count = ps.range(0, 2);
|
u32 bruises_count = ps.range(0, 2);
|
||||||
for (u32 i = 0; i < bruises_count; i++) {
|
for (u32 i = 0; i < bruises_count; i++) {
|
||||||
|
Loading…
Reference in New Issue
Block a user