aboutsummaryrefslogtreecommitdiff
path: root/src/mapgen
diff options
context:
space:
mode:
authorElias Fleckenstein <eliasfleckenstein@web.de>2021-01-07 12:35:04 +0100
committerElias Fleckenstein <eliasfleckenstein@web.de>2021-01-07 12:35:04 +0100
commitcca4254f7c502b3e75691c6a3087da7cfcd72e28 (patch)
treee71b47442e77e09ca17e2c9c121a455f9deeace2 /src/mapgen
parent4fedc3a31ee20813e4c81377b3bd2af05a26b858 (diff)
parent58a709096ef8ff17644cf201f25b1831d9506514 (diff)
downloaddragonfireclient-cca4254f7c502b3e75691c6a3087da7cfcd72e28.tar.xz
Merge branch 'master' of https://github.com/minetest/minetest
Diffstat (limited to 'src/mapgen')
-rw-r--r--src/mapgen/mapgen_v7.cpp2
-rw-r--r--src/mapgen/mg_schematic.cpp4
-rw-r--r--src/mapgen/treegen.cpp3
3 files changed, 5 insertions, 4 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/mg_schematic.cpp b/src/mapgen/mg_schematic.cpp
index dfd414709..e70e97e48 100644
--- a/src/mapgen/mg_schematic.cpp
+++ b/src/mapgen/mg_schematic.cpp
@@ -334,7 +334,7 @@ bool Schematic::deserializeFromMts(std::istream *is,
schemdata = new MapNode[nodecount];
MapNode::deSerializeBulk(ss, SER_FMT_VER_HIGHEST_READ, schemdata,
- nodecount, 2, 2, true);
+ nodecount, 2, 2);
// Fix probability values for nodes that were ignore; removed in v2
if (version < 2) {
@@ -376,7 +376,7 @@ bool Schematic::serializeToMts(std::ostream *os,
// compressed bulk node data
MapNode::serializeBulk(ss, SER_FMT_VER_HIGHEST_WRITE,
- schemdata, size.X * size.Y * size.Z, 2, 2, true);
+ schemdata, size.X * size.Y * size.Z, 2, 2, -1);
return true;
}
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++)