diff --git a/apps/openmw/engine.cpp b/apps/openmw/engine.cpp index 5b8d725583..3f3d5fe558 100644 --- a/apps/openmw/engine.cpp +++ b/apps/openmw/engine.cpp @@ -321,11 +321,7 @@ bool OMW::Engine::frame(float frametime) // update GUI by world data { ScopedProfile profile(frameStart, frameNumber, *timer, *stats); - - if (mStateManager->getState() != MWBase::StateManager::State_NoGame) - { - mWorld->updateWindowManager(); - } + mWorld->updateWindowManager(); } mLuaWorker->allowUpdate(); // if there is a separate Lua thread, it starts the update now diff --git a/apps/openmw/mwworld/worldimp.cpp b/apps/openmw/mwworld/worldimp.cpp index 1b6af6038e..f20cbd208f 100644 --- a/apps/openmw/mwworld/worldimp.cpp +++ b/apps/openmw/mwworld/worldimp.cpp @@ -60,6 +60,7 @@ #include "../mwbase/mechanicsmanager.hpp" #include "../mwbase/scriptmanager.hpp" #include "../mwbase/soundmanager.hpp" +#include "../mwbase/statemanager.hpp" #include "../mwbase/windowmanager.hpp" #include "../mwmechanics/actorutil.hpp" @@ -997,6 +998,9 @@ namespace MWWorld { MWWorld::Ptr facedObject; + if (MWBase::Environment::get().getStateManager()->getState() == MWBase::StateManager::State_NoGame) + return facedObject; + if (MWBase::Environment::get().getWindowManager()->isGuiMode() && MWBase::Environment::get().getWindowManager()->isConsoleMode()) facedObject = getFacedObject(getMaxActivationDistance() * 50, false);