diff options
Diffstat (limited to 'src/script/lua_api/l_env.cpp')
-rw-r--r-- | src/script/lua_api/l_env.cpp | 6 |
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); |