aboutsummaryrefslogtreecommitdiff
path: root/src/script
diff options
context:
space:
mode:
authorSmallJoker <mk939@ymail.com>2014-11-12 21:11:40 +0100
committerCraig Robbins <kde.psych@gmail.com>2014-11-13 23:06:38 +1000
commit874109c5201c3deed49bc9eb98352e816c271d50 (patch)
treeb4cf37950677c6d399f292fc5704938f60364c6a /src/script
parentb57478b93bb1f3fdcd16ffa2d67f2bd37cdbc1c3 (diff)
downloadminetest-874109c5201c3deed49bc9eb98352e816c271d50.tar.gz
minetest-874109c5201c3deed49bc9eb98352e816c271d50.tar.bz2
minetest-874109c5201c3deed49bc9eb98352e816c271d50.zip
Add option 'eased' to NoiseParams
Signed-off-by: Craig Robbins <kde.psych@gmail.com>
Diffstat (limited to 'src/script')
-rw-r--r--src/script/common/c_content.cpp1
-rw-r--r--src/script/lua_api/l_noise.cpp4
2 files changed, 3 insertions, 2 deletions
diff --git a/src/script/common/c_content.cpp b/src/script/common/c_content.cpp
index 0e1e608c4..1972c40e0 100644
--- a/src/script/common/c_content.cpp
+++ b/src/script/common/c_content.cpp
@@ -1000,6 +1000,7 @@ bool read_noiseparams_nc(lua_State *L, int index, NoiseParams *np)
np->persist = getfloatfield_default(L, index, "persist", 0.0);
np->seed = getintfield_default(L, index, "seed", 0);
np->octaves = getintfield_default(L, index, "octaves", 0);
+ np->eased = getboolfield_default(L, index, "eased", false);
lua_getfield(L, index, "spread");
np->spread = read_v3f(L, -1);
diff --git a/src/script/lua_api/l_noise.cpp b/src/script/lua_api/l_noise.cpp
index 263ecfd69..4f230b76e 100644
--- a/src/script/lua_api/l_noise.cpp
+++ b/src/script/lua_api/l_noise.cpp
@@ -190,7 +190,7 @@ int LuaPerlinNoiseMap::l_get3dMap(lua_State *L)
v3f p = read_v3f(L, 2);
Noise *n = o->noise;
- n->perlinMap3D(p.X, p.Y, p.Z);
+ n->perlinMap3D(p.X, p.Y, p.Z, n->np->eased);
lua_newtable(L);
for (int z = 0; z != n->sz; z++) {
@@ -216,7 +216,7 @@ int LuaPerlinNoiseMap::l_get3dMap_flat(lua_State *L)
v3f p = read_v3f(L, 2);
Noise *n = o->noise;
- n->perlinMap3D(p.X, p.Y, p.Z);
+ n->perlinMap3D(p.X, p.Y, p.Z, n->np->eased);
int maplen = n->sx * n->sy * n->sz;