aboutsummaryrefslogtreecommitdiff
path: root/src/mapgen
diff options
context:
space:
mode:
authorparamat <paramat@users.noreply.github.com>2018-03-15 04:29:09 +0000
committerparamat <mat.gregory@virginmedia.com>2018-03-16 02:59:38 +0000
commit19c993bc39ea18f0ab2422b3f362ef16ddab75c8 (patch)
tree7dda4acdd59f6f9ca997c434050c367031ec7b36 /src/mapgen
parentd86ea9cd3edb43d3fbb673af154188a364a84827 (diff)
downloadminetest-19c993bc39ea18f0ab2422b3f362ef16ddab75c8.tar.gz
minetest-19c993bc39ea18f0ab2422b3f362ef16ddab75c8.tar.bz2
minetest-19c993bc39ea18f0ab2422b3f362ef16ddab75c8.zip
Biomes: Fix vertical biome blend
Diffstat (limited to 'src/mapgen')
-rw-r--r--src/mapgen/mg_biome.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mapgen/mg_biome.cpp b/src/mapgen/mg_biome.cpp
index 376f2d448..7f091f313 100644
--- a/src/mapgen/mg_biome.cpp
+++ b/src/mapgen/mg_biome.cpp
@@ -139,7 +139,7 @@ Biome *BiomeManager::getBiomeFromNoiseOriginal(float heat, float humidity, v3s16
}
mysrand(pos.Y + (heat + humidity) / 2);
- if (biome_closest_blend &&
+ if (biome_closest_blend && dist_min_blend <= dist_min &&
myrand_range(0, biome_closest_blend->vertical_blend) >=
pos.Y - biome_closest_blend->max_pos.Y)
return biome_closest_blend;
@@ -300,7 +300,7 @@ Biome *BiomeGenOriginal::calcBiomeFromNoise(float heat, float humidity, v3s16 po
// blend.
mysrand(pos.Y + (heat + humidity) / 2);
- if (biome_closest_blend &&
+ if (biome_closest_blend && dist_min_blend <= dist_min &&
myrand_range(0, biome_closest_blend->vertical_blend) >=
pos.Y - biome_closest_blend->max_pos.Y)
return biome_closest_blend;