From 38cf080a9c2a1e5b9ad41cf62d2eacdc92133d16 Mon Sep 17 00:00:00 2001 From: Kahrl Date: Mon, 23 Feb 2015 16:48:51 +1000 Subject: Disallow object:remove() if the object is a player Rebased by Zeno- (conflict in lua_api.txt) --- src/script/lua_api/l_object.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/script/lua_api/l_object.cpp b/src/script/lua_api/l_object.cpp index e048d072f..73f6e93b3 100644 --- a/src/script/lua_api/l_object.cpp +++ b/src/script/lua_api/l_object.cpp @@ -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="<getId()<m_removed = true; return 0; -- cgit v1.2.3