diff options
author | Perttu Ahola <celeron55@gmail.com> | 2011-06-26 18:50:13 +0300 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2011-06-26 18:50:13 +0300 |
commit | 2bd2bdff082197698accee1a2a4b52c7a5539b3e (patch) | |
tree | 2c27fc96c6953eb1aa6570c4c2dd5977405da1cc | |
parent | 91cfbe2891a3fbec2aac019ccfba74b667d94fc4 (diff) | |
download | minetest-2bd2bdff082197698accee1a2a4b52c7a5539b3e.tar.gz minetest-2bd2bdff082197698accee1a2a4b52c7a5539b3e.tar.bz2 minetest-2bd2bdff082197698accee1a2a4b52c7a5539b3e.zip |
updated noise stuff
-rw-r--r-- | src/noise.cpp | 6 | ||||
-rw-r--r-- | src/noise.h | 3 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/noise.cpp b/src/noise.cpp index b755a824a..9c2141ce0 100644 --- a/src/noise.cpp +++ b/src/noise.cpp @@ -238,7 +238,11 @@ double noise3d_param(const NoiseParams ¶m, double x, double y, double z) y /= s; z /= s; - if(param.type == NOISE_PERLIN) + if(param.type == NOISE_CONSTANT_ONE) + { + return 1.0; + } + else if(param.type == NOISE_PERLIN) { return param.noise_scale*noise3d_perlin(x,y,z, param.seed, param.octaves, diff --git a/src/noise.h b/src/noise.h index c8d8985c6..ed75f316d 100644 --- a/src/noise.h +++ b/src/noise.h @@ -82,10 +82,11 @@ double noise3d_perlin_abs(double x, double y, double z, int seed, enum NoiseType { + NOISE_CONSTANT_ONE, NOISE_PERLIN, NOISE_PERLIN_ABS, NOISE_PERLIN_CONTOUR, - NOISE_PERLIN_CONTOUR_FLIP_YZ + NOISE_PERLIN_CONTOUR_FLIP_YZ, }; struct NoiseParams |