summaryrefslogtreecommitdiff
path: root/src/mapgen.cpp
diff options
context:
space:
mode:
authorSergey Gilfanov <inkelyad@gmail.com>2012-07-26 22:52:05 +0400
committerPerttu Ahola <celeron55@gmail.com>2012-09-01 13:22:07 +0300
commit0f7728f84decb836bd7d025456315c297fe30435 (patch)
treecd138cedaac5c5b5518e4fba9db1bbbc4ad16b7a /src/mapgen.cpp
parentc129b3852b97b7bd7ea7fe904af68243ad44a333 (diff)
downloadminetest-0f7728f84decb836bd7d025456315c297fe30435.tar.gz
minetest-0f7728f84decb836bd7d025456315c297fe30435.tar.bz2
minetest-0f7728f84decb836bd7d025456315c297fe30435.zip
Smooth transition to the desert biome.
Diffstat (limited to 'src/mapgen.cpp')
-rw-r--r--src/mapgen.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mapgen.cpp b/src/mapgen.cpp
index af53d0091..b37d03501 100644
--- a/src/mapgen.cpp
+++ b/src/mapgen.cpp
@@ -1297,7 +1297,9 @@ BiomeType get_biome(u64 seed, v2s16 p2d)
double d = noise2d_perlin(
0.6+(float)p2d.X/250, 0.2+(float)p2d.Y/250,
seed+9130, 3, 0.50);
- if(d > 0.35)
+ if(d > 0.45)
+ return BT_DESERT;
+ if(d > 0.35 && (noise2d( p2d.X, p2d.Y, int(seed) ) + 1.0) > ( 0.45 - d ) * 20.0 )
return BT_DESERT;
return BT_NORMAL;
};