aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorparamat <mat.gregory@virginmedia.com>2015-01-18 11:52:59 +0000
committerkwolekr <kwolekr@minetest.net>2015-01-22 02:06:33 -0500
commit408d9b72f00b1aed2de5a6738571acab1149f690 (patch)
treec1097268b58cb526322b49a74fb6301e1882b4a0
parenta28055f8fd8b09d1256c1da3c174b427f7b0c514 (diff)
downloadminetest-408d9b72f00b1aed2de5a6738571acab1149f690.tar.gz
minetest-408d9b72f00b1aed2de5a6738571acab1149f690.tar.bz2
minetest-408d9b72f00b1aed2de5a6738571acab1149f690.zip
Mgv7 generateRidgeTerrain: Enable rangelim of widthn to remove abysses, calculate widthn later in function
Reduce width to 0.2 Carve river channels in deeper waters
-rw-r--r--src/mapgen_v7.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mapgen_v7.cpp b/src/mapgen_v7.cpp
index d44d8adc4..251540880 100644
--- a/src/mapgen_v7.cpp
+++ b/src/mapgen_v7.cpp
@@ -510,17 +510,17 @@ void MapgenV7::generateRidgeTerrain()
for (s16 x = node_min.X; x <= node_max.X; x++, index++, vi++) {
int j = (z - node_min.Z) * csize.X + (x - node_min.X);
- if (heightmap[j] < water_level - 4)
+ if (heightmap[j] < water_level - 16)
continue;
- float widthn = (noise_terrain_persist->result[j] - 0.6) / 0.1;
- //widthn = rangelim(widthn, -0.05, 0.5);
-
- float width = 0.3; // TODO: figure out acceptable perlin noise values
+ float width = 0.2; // TODO: figure out acceptable perlin noise values
float uwatern = noise_ridge_uwater->result[j] * 2;
- if (uwatern < -width || uwatern > width)
+ if (fabs(uwatern) > width)
continue;
+ float widthn = (noise_terrain_persist->result[j] - 0.6) / 0.1;
+ widthn = rangelim(widthn, -0.05, 0.5);
+
float height_mod = (float)(y + 17) / 2.5;
float width_mod = (width - fabs(uwatern));
float nridge = noise_ridge->result[index] * (float)y / 7.0;