From 180e551c56ec7229a15bfd9ce7339bc9881e1df6 Mon Sep 17 00:00:00 2001 From: Loïc Blot Date: Mon, 4 Jun 2018 22:38:07 +0200 Subject: Modernize lua read (part 1): C++ templating insurance (#7394) * Modernize lua read (part 1): C++ templating assurance Implement the float reader --- src/script/lua_api/l_noise.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/script/lua_api/l_noise.cpp') diff --git a/src/script/lua_api/l_noise.cpp b/src/script/lua_api/l_noise.cpp index 85e908356..d382ca3bd 100644 --- a/src/script/lua_api/l_noise.cpp +++ b/src/script/lua_api/l_noise.cpp @@ -69,8 +69,8 @@ int LuaPerlinNoise::create_object(lua_State *L) } else { params.seed = luaL_checkint(L, 1); params.octaves = luaL_checkint(L, 2); - params.persist = luaL_checknumber(L, 3); - params.spread = v3f(1, 1, 1) * luaL_checknumber(L, 4); + params.persist = readParam(L, 3); + params.spread = v3f(1, 1, 1) * readParam(L, 4); } LuaPerlinNoise *o = new LuaPerlinNoise(¶ms); -- cgit v1.2.3