From: Perttu Ahola Date: Sun, 26 Jun 2011 15:50:13 +0000 (+0300) Subject: updated noise stuff X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=2bd2bdff082197698accee1a2a4b52c7a5539b3e;p=zefram%2Fminetest%2Fminetest_engine.git updated noise stuff --- diff --git a/src/noise.cpp b/src/noise.cpp index b755a824..9c2141ce 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 c8d8985c..ed75f316 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