mirror of
https://github.com/OpenMW/openmw.git
synced 2025-06-05 18:11:32 +00:00
Merge branch 'fix_6590' into 'master'
Fix #6590 Closes #6590 See merge request OpenMW/openmw!1633
This commit is contained in:
commit
2a6392fe5c
1 changed files with 4 additions and 2 deletions
|
@ -114,6 +114,7 @@ namespace MWLua
|
||||||
|
|
||||||
void LuaManager::update()
|
void LuaManager::update()
|
||||||
{
|
{
|
||||||
|
static const bool luaDebug = Settings::Manager::getBool("lua debug", "Lua");
|
||||||
if (mPlayer.isEmpty())
|
if (mPlayer.isEmpty())
|
||||||
return; // The game is not started yet.
|
return; // The game is not started yet.
|
||||||
|
|
||||||
|
@ -172,7 +173,8 @@ namespace MWLua
|
||||||
LObject obj(e.mDest, objectRegistry);
|
LObject obj(e.mDest, objectRegistry);
|
||||||
if (!obj.isValid())
|
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;
|
continue;
|
||||||
}
|
}
|
||||||
LocalScripts* scripts = obj.ptr().getRefData().getLuaScripts();
|
LocalScripts* scripts = obj.ptr().getRefData().getLuaScripts();
|
||||||
|
@ -204,7 +206,7 @@ namespace MWLua
|
||||||
GObject obj(id, objectRegistry);
|
GObject obj(id, objectRegistry);
|
||||||
if (obj.isValid())
|
if (obj.isValid())
|
||||||
mGlobalScripts.actorActive(obj);
|
mGlobalScripts.actorActive(obj);
|
||||||
else
|
else if (luaDebug)
|
||||||
Log(Debug::Verbose) << "Can not call onActorActive engine handler: object" << idToString(id) << " is already removed";
|
Log(Debug::Verbose) << "Can not call onActorActive engine handler: object" << idToString(id) << " is already removed";
|
||||||
}
|
}
|
||||||
mActorAddedEvents.clear();
|
mActorAddedEvents.clear();
|
||||||
|
|
Loading…
Reference in a new issue