mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
This reverts commit 808eb4c571
.
This commit is contained in:
parent
cfaef5b1cf
commit
82731d0d3d
1 changed files with 2 additions and 6 deletions
|
@ -153,9 +153,7 @@ int MetaDataRef::l_set_int(lua_State *L)
|
||||||
MetaDataRef *ref = checkobject(L, 1);
|
MetaDataRef *ref = checkobject(L, 1);
|
||||||
std::string name = luaL_checkstring(L, 2);
|
std::string name = luaL_checkstring(L, 2);
|
||||||
int a = luaL_checkint(L, 3);
|
int a = luaL_checkint(L, 3);
|
||||||
std::string str;
|
std::string str = itos(a);
|
||||||
if (a != 0)
|
|
||||||
str = itos(a);
|
|
||||||
|
|
||||||
Metadata *meta = ref->getmeta(true);
|
Metadata *meta = ref->getmeta(true);
|
||||||
if (meta == NULL || str == meta->getString(name))
|
if (meta == NULL || str == meta->getString(name))
|
||||||
|
@ -193,9 +191,7 @@ int MetaDataRef::l_set_float(lua_State *L)
|
||||||
MetaDataRef *ref = checkobject(L, 1);
|
MetaDataRef *ref = checkobject(L, 1);
|
||||||
std::string name = luaL_checkstring(L, 2);
|
std::string name = luaL_checkstring(L, 2);
|
||||||
float a = readParam<float>(L, 3);
|
float a = readParam<float>(L, 3);
|
||||||
std::string str;
|
std::string str = ftos(a);
|
||||||
if (a != 0)
|
|
||||||
str = ftos(a);
|
|
||||||
|
|
||||||
Metadata *meta = ref->getmeta(true);
|
Metadata *meta = ref->getmeta(true);
|
||||||
if (meta == NULL || str == meta->getString(name))
|
if (meta == NULL || str == meta->getString(name))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue