summaryrefslogtreecommitdiff
path: root/src/mapgen
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2020-12-23 22:03:49 +0100
committersfan5 <sfan5@live.de>2020-12-24 13:44:54 +0100
commit74762470b2aa11a5271b846549ff14b86c1705d2 (patch)
treecf4fd29ba05a94395674ac6cd5b2eeb7bdac0ee1 /src/mapgen
parent289425f6bd6cfe1f66218918d9d5bd1b9f89aa7c (diff)
downloadminetest-74762470b2aa11a5271b846549ff14b86c1705d2.tar.gz
minetest-74762470b2aa11a5271b846549ff14b86c1705d2.tar.bz2
minetest-74762470b2aa11a5271b846549ff14b86c1705d2.zip
Fix some minor code issues all over the place
Diffstat (limited to 'src/mapgen')
-rw-r--r--src/mapgen/mapgen_v7.cpp2
-rw-r--r--src/mapgen/treegen.cpp3
2 files changed, 3 insertions, 2 deletions
diff --git a/src/mapgen/mapgen_v7.cpp b/src/mapgen/mapgen_v7.cpp
index cc5f5726d..91f004518 100644
--- a/src/mapgen/mapgen_v7.cpp
+++ b/src/mapgen/mapgen_v7.cpp
@@ -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'
diff --git a/src/mapgen/treegen.cpp b/src/mapgen/treegen.cpp
index e633d800a..ec7771439 100644
--- a/src/mapgen/treegen.cpp
+++ b/src/mapgen/treegen.cpp
@@ -406,7 +406,8 @@ treegen::error make_ltree(MMVManip &vmanip, v3s16 p0,
v3f(position.X, position.Y, position.Z - 1),
tree_definition
);
- } if (!stack_orientation.empty()) {
+ }
+ if (!stack_orientation.empty()) {
s16 size = 1;
for (x = -size; x <= size; x++)
for (y = -size; y <= size; y++)