mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
ServerEnv: Clean up object lifecycle handling (#6414)
* ServerEnv: Clean up object lifecycle handling
This commit is contained in:
parent
edbc533414
commit
04839f233f
8 changed files with 175 additions and 213 deletions
|
@ -343,6 +343,10 @@ void ScriptApiBase::objectrefGetOrCreate(lua_State *L,
|
|||
ObjectRef::create(L, cobj);
|
||||
} else {
|
||||
push_objectRef(L, cobj->getId());
|
||||
if (cobj->isGone())
|
||||
warningstream << "ScriptApiBase::objectrefGetOrCreate(): "
|
||||
<< "Pushing ObjectRef to removed/deactivated object"
|
||||
<< ", this is probably a bug." << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue