summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/noise.cpp6
-rw-r--r--src/noise.h3
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 &param, 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