From: Perttu Ahola Date: Sun, 26 Jun 2011 15:50:13 +0000 (+0300) Subject: updated noise stuff X-Git-Tag: 0.2.20110731_3~86 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=2bd2bdff082197698accee1a2a4b52c7a5539b3e;p=oweals%2Fminetest.git updated noise stuff --- 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