mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Modernize lua read (part 1): C++ templating insurance (#7394)
* Modernize lua read (part 1): C++ templating assurance Implement the float reader
This commit is contained in:
parent
86b19f2849
commit
180e551c56
9 changed files with 43 additions and 21 deletions
|
@ -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<float>(L, 3);
|
||||
params.spread = v3f(1, 1, 1) * readParam<float>(L, 4);
|
||||
}
|
||||
|
||||
LuaPerlinNoise *o = new LuaPerlinNoise(¶ms);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue