From 8e330653c7caa1e3de5740919e6f9a0e6320fed4 Mon Sep 17 00:00:00 2001 From: Petr Mikheev Date: Sun, 6 Feb 2022 22:16:37 +0100 Subject: [PATCH] Fix #6590 --- apps/openmw/mwlua/luamanagerimp.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/openmw/mwlua/luamanagerimp.cpp b/apps/openmw/mwlua/luamanagerimp.cpp index e9146b8af4..0dcd72d359 100644 --- a/apps/openmw/mwlua/luamanagerimp.cpp +++ b/apps/openmw/mwlua/luamanagerimp.cpp @@ -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();