mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Modernize various files (src/m*) (#6267)
* Modernize various files (src/m*) * range-based for loops * code style * C++ headers instead of C headers * Default operators * empty function Thanks to clang-tidy
This commit is contained in:
parent
fb196be8cf
commit
c427533389
34 changed files with 254 additions and 355 deletions
|
@ -240,9 +240,9 @@ int MapgenV7::getSpawnLevelAtPoint(v2s16 p)
|
|||
if (!(spflags & MGV7_MOUNTAINS)) {
|
||||
if (y < water_level || y > max_spawn_y)
|
||||
return MAX_MAP_GENERATION_LIMIT; // Unsuitable spawn point
|
||||
else
|
||||
// y + 2 because y is surface level and due to biome 'dust'
|
||||
return y + 2;
|
||||
|
||||
// y + 2 because y is surface level and due to biome 'dust'
|
||||
return y + 2;
|
||||
}
|
||||
|
||||
// Search upwards for first node without mountain terrain
|
||||
|
@ -251,9 +251,9 @@ int MapgenV7::getSpawnLevelAtPoint(v2s16 p)
|
|||
if (!getMountainTerrainAtPoint(p.X, y + 1, p.Y)) {
|
||||
if (y <= water_level || y > max_spawn_y)
|
||||
return MAX_MAP_GENERATION_LIMIT; // Unsuitable spawn point
|
||||
else
|
||||
// y + 1 due to biome 'dust'
|
||||
return y + 1;
|
||||
|
||||
// y + 1 due to biome 'dust'
|
||||
return y + 1;
|
||||
}
|
||||
y++;
|
||||
iters--;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue