mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 16:45:20 +02:00
Fix set_bone_position regression (error on passing none)
This commit is contained in:
@@ -520,7 +520,7 @@ int ObjectRef::l_set_bone_position(lua_State *L)
|
||||
{
|
||||
NO_MAP_LOCK_REQUIRED;
|
||||
|
||||
log_deprecated(L,"Deprecated call to set_bone_position, use set_bone_override instead");
|
||||
log_deprecated(L, "Deprecated call to set_bone_position, use set_bone_override instead", 1, true);
|
||||
|
||||
ObjectRef *ref = checkObject<ObjectRef>(L, 1);
|
||||
ServerActiveObject *sao = getobject(ref);
|
||||
@@ -528,12 +528,12 @@ int ObjectRef::l_set_bone_position(lua_State *L)
|
||||
return 0;
|
||||
|
||||
std::string bone;
|
||||
if (!lua_isnil(L, 2))
|
||||
if (!lua_isnoneornil(L, 2))
|
||||
bone = readParam<std::string>(L, 2);
|
||||
BoneOverride props;
|
||||
if (!lua_isnil(L, 3))
|
||||
if (!lua_isnoneornil(L, 3))
|
||||
props.position.vector = check_v3f(L, 3);
|
||||
if (!lua_isnil(L, 4))
|
||||
if (!lua_isnoneornil(L, 4))
|
||||
props.rotation.next = core::quaternion(check_v3f(L, 4) * core::DEGTORAD);
|
||||
props.position.absolute = true;
|
||||
props.rotation.absolute = true;
|
||||
@@ -546,7 +546,7 @@ int ObjectRef::l_get_bone_position(lua_State *L)
|
||||
{
|
||||
NO_MAP_LOCK_REQUIRED;
|
||||
|
||||
log_deprecated(L,"Deprecated call to get_bone_position, use get_bone_override instead");
|
||||
log_deprecated(L, "Deprecated call to get_bone_position, use get_bone_override instead", 1, true);
|
||||
|
||||
ObjectRef *ref = checkObject<ObjectRef>(L, 1);
|
||||
ServerActiveObject *sao = getobject(ref);
|
||||
|
Reference in New Issue
Block a user