1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-25 21:41:04 +00:00

Merge branch 'fix_6590' into 'master'

Fix #6590

Closes #6590

See merge request OpenMW/openmw!1633
This commit is contained in:
psi29a 2022-02-07 14:05:18 +00:00
commit 2a6392fe5c

View File

@ -114,6 +114,7 @@ namespace MWLua
void LuaManager::update()
{
static const bool luaDebug = Settings::Manager::getBool("lua debug", "Lua");
if (mPlayer.isEmpty())
return; // The game is not started yet.
@ -172,7 +173,8 @@ namespace MWLua
LObject obj(e.mDest, objectRegistry);
if (!obj.isValid())
{
Log(Debug::Verbose) << "Can not call engine handlers: object" << idToString(e.mDest) << " is not found";
if (luaDebug)
Log(Debug::Verbose) << "Can not call engine handlers: object" << idToString(e.mDest) << " is not found";
continue;
}
LocalScripts* scripts = obj.ptr().getRefData().getLuaScripts();
@ -204,7 +206,7 @@ namespace MWLua
GObject obj(id, objectRegistry);
if (obj.isValid())
mGlobalScripts.actorActive(obj);
else
else if (luaDebug)
Log(Debug::Verbose) << "Can not call onActorActive engine handler: object" << idToString(id) << " is already removed";
}
mActorAddedEvents.clear();