diff options
author | kwolekr <kwolekr@minetest.net> | 2015-04-19 21:42:40 -0400 |
---|---|---|
committer | kwolekr <kwolekr@minetest.net> | 2015-04-19 21:42:40 -0400 |
commit | 3d4244cc75b7e75565476032851fbd30d5cd9306 (patch) | |
tree | 9d1e7ad8b44d93d62a559f62bcc97639f6759037 /src/script/lua_api | |
parent | 687d969c9c50be98597ee9f383280517f1f8cd97 (diff) | |
download | minetest-3d4244cc75b7e75565476032851fbd30d5cd9306.tar.gz minetest-3d4244cc75b7e75565476032851fbd30d5cd9306.tar.bz2 minetest-3d4244cc75b7e75565476032851fbd30d5cd9306.zip |
Add 'persistence' alias for Lua noiseparams and validate more vector parameters
Diffstat (limited to 'src/script/lua_api')
-rw-r--r-- | src/script/lua_api/l_noise.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/script/lua_api/l_noise.cpp b/src/script/lua_api/l_noise.cpp index bf3dca589..84f8875b8 100644 --- a/src/script/lua_api/l_noise.cpp +++ b/src/script/lua_api/l_noise.cpp @@ -43,7 +43,7 @@ int LuaPerlinNoise::l_get2d(lua_State *L) { NO_MAP_LOCK_REQUIRED; LuaPerlinNoise *o = checkobject(L, 1); - v2f p = read_v2f(L, 2); + v2f p = check_v2f(L, 2); lua_Number val = NoisePerlin2D(&o->np, p.X, p.Y, 0); lua_pushnumber(L, val); return 1; @@ -54,7 +54,7 @@ int LuaPerlinNoise::l_get3d(lua_State *L) { NO_MAP_LOCK_REQUIRED; LuaPerlinNoise *o = checkobject(L, 1); - v3f p = read_v3f(L, 2); + v3f p = check_v3f(L, 2); lua_Number val = NoisePerlin3D(&o->np, p.X, p.Y, p.Z, 0); lua_pushnumber(L, val); return 1; @@ -168,7 +168,7 @@ int LuaPerlinNoiseMap::l_get2dMap(lua_State *L) size_t i = 0; LuaPerlinNoiseMap *o = checkobject(L, 1); - v2f p = read_v2f(L, 2); + v2f p = check_v2f(L, 2); Noise *n = o->noise; n->perlinMap2D(p.X, p.Y); @@ -191,7 +191,7 @@ int LuaPerlinNoiseMap::l_get2dMap_flat(lua_State *L) NO_MAP_LOCK_REQUIRED; LuaPerlinNoiseMap *o = checkobject(L, 1); - v2f p = read_v2f(L, 2); + v2f p = check_v2f(L, 2); Noise *n = o->noise; n->perlinMap2D(p.X, p.Y); @@ -213,7 +213,7 @@ int LuaPerlinNoiseMap::l_get3dMap(lua_State *L) size_t i = 0; LuaPerlinNoiseMap *o = checkobject(L, 1); - v3f p = read_v3f(L, 2); + v3f p = check_v3f(L, 2); if (!o->m_is3d) return 0; @@ -243,7 +243,7 @@ int LuaPerlinNoiseMap::l_get3dMap_flat(lua_State *L) NO_MAP_LOCK_REQUIRED; LuaPerlinNoiseMap *o = checkobject(L, 1); - v3f p = read_v3f(L, 2); + v3f p = check_v3f(L, 2); if (!o->m_is3d) return 0; |