mirror of
https://github.com/OpenMW/openmw.git
synced 2025-05-28 14:41:33 +00:00
Fix #6590
This commit is contained in:
parent
7f4d4c0d70
commit
8e330653c7
1 changed files with 4 additions and 2 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue