aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNils Dagsson Moskopp <nils@dieweltistgarnichtso.net>2011-07-15 06:37:47 +0200
committerNils Dagsson Moskopp <nils@dieweltistgarnichtso.net>2011-07-15 06:37:47 +0200
commit2c5617709d229f167d6f2b871d5abf7dbb827964 (patch)
tree5915c7a4c74dee946c329b6caca9ee2302f7e8e5
parent287b735224a905cbc679420aea64c9ac8289c488 (diff)
downloadminetest-2c5617709d229f167d6f2b871d5abf7dbb827964.tar.gz
minetest-2c5617709d229f167d6f2b871d5abf7dbb827964.tar.bz2
minetest-2c5617709d229f167d6f2b871d5abf7dbb827964.zip
* regression fix, clay occurs again now
-rw-r--r--src/mapgen.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/mapgen.cpp b/src/mapgen.cpp
index bb4785bbf..dfea862a5 100644
--- a/src/mapgen.cpp
+++ b/src/mapgen.cpp
@@ -1840,13 +1840,6 @@ void make_block(BlockMakeData *data)
bool water_detected = false;
bool have_clay = false;
- // Determine whether to have clay in the sand here
- double claynoise = noise2d_perlin(
- 0.5+(float)p2d.X/500, 0.5+(float)p2d.Y/500,
- data->seed+4321, 6, 0.95);
-
- have_clay = have_sand && (claynoise > 1.25);
-
// Use fast index incrementing
s16 start_y = node_max.Y+2;
v3s16 em = vmanip.m_area.getExtent();
@@ -1873,6 +1866,15 @@ void make_block(BlockMakeData *data)
{
if(have_sand)
{
+ // Determine whether to have clay in the sand here
+ double claynoise = noise2d_perlin(
+ 0.5+(float)p2d.X/500, 0.5+(float)p2d.Y/500,
+ data->seed+4321, 6, 0.95) + 0.5;
+
+ have_clay = (y <= WATER_LEVEL) && (y >= WATER_LEVEL-2) && (
+ ((claynoise > 0) && (claynoise < 0.04) && (current_depth == 0)) ||
+ ((claynoise > 0) && (claynoise < 0.12) && (current_depth == 1))
+ );
if (have_clay)
vmanip.m_data[i] = MapNode(CONTENT_CLAY);
else