Skip to content

Commit

Permalink
Mgv7: Limit pseudorandom caves to surface mapchunk or below
Browse files Browse the repository at this point in the history
To avoid bright caves at mapchunk borders when generating mapchunks upwards
  • Loading branch information
paramat committed Mar 19, 2016
1 parent c5c727d commit f1aea6b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/mapgen_v7.cpp
Expand Up @@ -912,6 +912,9 @@ void MapgenV7::generateCaves(s16 max_stone_y)
}
}

if (node_min.Y >= water_level)
return;

PseudoRandom ps(blockseed + 21343);
u32 bruises_count = ps.range(0, 2);
for (u32 i = 0; i < bruises_count; i++) {
Expand Down

0 comments on commit f1aea6b

Please sign in to comment.