aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorparamat <paramat@users.noreply.github.com>2018-02-20 13:42:52 +0000
committerparamat <mat.gregory@virginmedia.com>2018-02-20 15:28:52 +0000
commitf9ad0619103ceee40e2a7810b971f93d877a63cd (patch)
tree95cddfa2f3e55a556ba8b7ff25285bfb181ac960
parent2bc7c5ff93859489c57c055cafb4d75146e062b3 (diff)
downloadminetest-f9ad0619103ceee40e2a7810b971f93d877a63cd.tar.gz
minetest-f9ad0619103ceee40e2a7810b971f93d877a63cd.tar.bz2
minetest-f9ad0619103ceee40e2a7810b971f93d877a63cd.zip
Vertical biome blend: Tune blend patterns
-rw-r--r--src/mapgen/mg_biome.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mapgen/mg_biome.cpp b/src/mapgen/mg_biome.cpp
index 2273be280..eb12fcc73 100644
--- a/src/mapgen/mg_biome.cpp
+++ b/src/mapgen/mg_biome.cpp
@@ -133,7 +133,7 @@ Biome *BiomeManager::getBiomeFromNoiseOriginal(float heat, float humidity, s16 y
}
}
- mysrand(y + (heat - humidity) * 2);
+ mysrand(y + (heat + humidity) / 2);
if (biome_closest_blend &&
myrand_range(0, biome_closest_blend->vertical_blend) >=
y - biome_closest_blend->y_max)
@@ -196,7 +196,7 @@ BiomeGenOriginal::~BiomeGenOriginal()
delete noise_humidity_blend;
}
-
+// Only usable in a mapgen thread
Biome *BiomeGenOriginal::calcBiomeAtPoint(v3s16 pos) const
{
float heat =
@@ -286,8 +286,9 @@ Biome *BiomeGenOriginal::calcBiomeFromNoise(float heat, float humidity, s16 y) c
}
// Carefully tune pseudorandom seed variation to avoid single node dither
- // and create larger scale blending patterns.
- mysrand(y + (heat - humidity) * 2);
+ // and create larger scale blending patterns similar to horizontal biome
+ // blend.
+ mysrand(y + (heat + humidity) / 2);
if (biome_closest_blend &&
myrand_range(0, biome_closest_blend->vertical_blend) >=