mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
parent
be71e70a91
commit
91c4f7f0ea
1 changed files with 5 additions and 0 deletions
|
@ -674,8 +674,13 @@ int ObjectRef::l_set_attach(lua_State *L)
|
||||||
ServerActiveObject *parent = getobject(parent_ref);
|
ServerActiveObject *parent = getobject(parent_ref);
|
||||||
if (co == NULL)
|
if (co == NULL)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (parent == NULL)
|
if (parent == NULL)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
if (co == parent)
|
||||||
|
throw LuaError("ObjectRef::set_attach: attaching object to itself is not allowed.");
|
||||||
|
|
||||||
// Do it
|
// Do it
|
||||||
int parent_id = 0;
|
int parent_id = 0;
|
||||||
std::string bone;
|
std::string bone;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue