1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-12-18 04:55:20 +01:00

Fix some minor code issues all over the place

This commit is contained in:
sfan5
2020-12-23 22:03:49 +01:00
parent 289425f6bd
commit 74762470b2
19 changed files with 45 additions and 109 deletions

View File

@@ -297,7 +297,7 @@ int MapgenV7::getSpawnLevelAtPoint(v2s16 p)
int iters = 256;
while (iters > 0 && y <= max_spawn_y) {
if (!getMountainTerrainAtPoint(p.X, y + 1, p.Y)) {
if (y <= water_level || y > max_spawn_y)
if (y <= water_level)
return MAX_MAP_GENERATION_LIMIT; // Unsuitable spawn point
// y + 1 due to biome 'dust'