summaryrefslogtreecommitdiff
path: root/src/script/lua_api/l_env.cpp
diff options
context:
space:
mode:
authorkwolekr <kwolekr@minetest.net>2014-12-07 21:57:12 -0500
committerkwolekr <kwolekr@minetest.net>2014-12-07 21:59:32 -0500
commit2fd3d5202051e03303ac2b8e76976a7c4c8477f3 (patch)
treec461272b8eef33846cf5773e38c6a8b7716e1d0d /src/script/lua_api/l_env.cpp
parent638f3a8454941d3f561b1834d47fa07a611454a3 (diff)
downloadminetest-2fd3d5202051e03303ac2b8e76976a7c4c8477f3.tar.gz
minetest-2fd3d5202051e03303ac2b8e76976a7c4c8477f3.tar.bz2
minetest-2fd3d5202051e03303ac2b8e76976a7c4c8477f3.zip
Add flags and lacunarity as new noise parameters
Add 'absolute value' option to noise map functions Extend persistence modulation to 3D noise Extend 'eased' option to noise2d_perlin* functions Some noise.cpp formatting fixups
Diffstat (limited to 'src/script/lua_api/l_env.cpp')
-rw-r--r--src/script/lua_api/l_env.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/script/lua_api/l_env.cpp b/src/script/lua_api/l_env.cpp
index 130b15c0b..8f1f851d7 100644
--- a/src/script/lua_api/l_env.cpp
+++ b/src/script/lua_api/l_env.cpp
@@ -608,13 +608,13 @@ int ModApiEnvMod::l_get_perlin_map(lua_State *L)
{
GET_ENV_PTR;
- NoiseParams *np = read_noiseparams(L, 1);
- if (!np)
+ NoiseParams np;
+ if (!read_noiseparams(L, 1, &np))
return 0;
v3s16 size = read_v3s16(L, 2);
int seed = (int)(env->getServerMap().getSeed());
- LuaPerlinNoiseMap *n = new LuaPerlinNoiseMap(np, seed, size);
+ LuaPerlinNoiseMap *n = new LuaPerlinNoiseMap(&np, seed, size);
*(void **)(lua_newuserdata(L, sizeof(void *))) = n;
luaL_getmetatable(L, "PerlinNoiseMap");
lua_setmetatable(L, -2);