mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Dungeons: Move duplicated y limit checks to generation function
This commit is contained in:
parent
b50a166bb0
commit
ec5f591014
7 changed files with 8 additions and 13 deletions
|
@ -886,7 +886,8 @@ bool MapgenBasic::generateCavernsNoise(s16 max_stone_y)
|
|||
|
||||
void MapgenBasic::generateDungeons(s16 max_stone_y)
|
||||
{
|
||||
if (max_stone_y < node_min.Y)
|
||||
if (node_min.Y > max_stone_y || node_min.Y > dungeon_ymax ||
|
||||
node_max.Y < dungeon_ymin)
|
||||
return;
|
||||
|
||||
u16 num_dungeons = std::fmax(std::floor(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue