mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Fix types of get_mapgen_setting_noiseparams (#12025)
This commit is contained in:
parent
1c73902005
commit
1ee37148a8
4 changed files with 21 additions and 60 deletions
|
@ -73,13 +73,6 @@ static void set_vector_metatable(lua_State *L)
|
|||
lua_pop(L, 1);
|
||||
}
|
||||
|
||||
|
||||
void push_float_string(lua_State *L, float value)
|
||||
{
|
||||
auto str = ftos(value);
|
||||
lua_pushstring(L, str.c_str());
|
||||
}
|
||||
|
||||
void push_v3f(lua_State *L, v3f p)
|
||||
{
|
||||
lua_createtable(L, 0, 3);
|
||||
|
@ -101,26 +94,6 @@ void push_v2f(lua_State *L, v2f p)
|
|||
lua_setfield(L, -2, "y");
|
||||
}
|
||||
|
||||
void push_v3_float_string(lua_State *L, v3f p)
|
||||
{
|
||||
lua_createtable(L, 0, 3);
|
||||
push_float_string(L, p.X);
|
||||
lua_setfield(L, -2, "x");
|
||||
push_float_string(L, p.Y);
|
||||
lua_setfield(L, -2, "y");
|
||||
push_float_string(L, p.Z);
|
||||
lua_setfield(L, -2, "z");
|
||||
}
|
||||
|
||||
void push_v2_float_string(lua_State *L, v2f p)
|
||||
{
|
||||
lua_createtable(L, 0, 2);
|
||||
push_float_string(L, p.X);
|
||||
lua_setfield(L, -2, "x");
|
||||
push_float_string(L, p.Y);
|
||||
lua_setfield(L, -2, "y");
|
||||
}
|
||||
|
||||
v2s16 read_v2s16(lua_State *L, int index)
|
||||
{
|
||||
v2s16 p;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue