mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Disallow object:remove() if the object is a player
Rebased by Zeno- (conflict in lua_api.txt)
This commit is contained in:
parent
cd4324e5a8
commit
38cf080a9c
2 changed files with 2 additions and 0 deletions
|
@ -131,6 +131,7 @@ int ObjectRef::l_remove(lua_State *L)
|
|||
ObjectRef *ref = checkobject(L, 1);
|
||||
ServerActiveObject *co = getobject(ref);
|
||||
if(co == NULL) return 0;
|
||||
if(co->getType() == ACTIVEOBJECT_TYPE_PLAYER) return 0;
|
||||
verbosestream<<"ObjectRef::l_remove(): id="<<co->getId()<<std::endl;
|
||||
co->m_removed = true;
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue