diff --git a/apps/openmw/engine.cpp b/apps/openmw/engine.cpp index ce6ba2b34..f21ddbec6 100644 --- a/apps/openmw/engine.cpp +++ b/apps/openmw/engine.cpp @@ -104,12 +104,14 @@ void OMW::Engine::frame(float frametime) mwmp::Main::Frame(frametime); // Main menu opened? Then scripts are also paused. - bool paused = mEnvironment.getWindowManager()->containsMode(MWGui::GM_MainMenu); + bool paused = /*mEnvironment.getWindowManager()->containsMode(MWGui::GM_MainMenu);*/ false; + // The above is overridden by tes3mp, where the game should never be pausable // update game state mEnvironment.getStateManager()->update (frametime); bool guiActive = /*mEnvironment.getWindowManager()->isGuiMode()*/ false; + // The above is overridden by tes3mp, where the Gui being active doesn't matter osg::Timer_t beforeScriptTick = osg::Timer::instance()->tick(); if (mEnvironment.getStateManager()->getState()== @@ -693,6 +695,8 @@ void OMW::Engine::go() dt = std::min(dt, 0.2); bool guiActive = /*mEnvironment.getWindowManager()->isGuiMode()*/ false; + // The above is overridden by tes3mp, where the Gui being active doesn't matter + if (!guiActive) simulationTime += dt; diff --git a/apps/openmw/mwscript/interpretercontext.cpp b/apps/openmw/mwscript/interpretercontext.cpp index 79f856398..cfcdbb517 100644 --- a/apps/openmw/mwscript/interpretercontext.cpp +++ b/apps/openmw/mwscript/interpretercontext.cpp @@ -210,7 +210,12 @@ namespace MWScript bool InterpreterContext::menuMode() { + /* Disabled by tes3mp, because being in a menu should not pause scripts in it + return MWBase::Environment::get().getWindowManager()->isGuiMode(); + */ + + return 0; } int InterpreterContext::getGlobalShort (const std::string& name) const diff --git a/apps/openmw/mwworld/worldimp.cpp b/apps/openmw/mwworld/worldimp.cpp index c2bd38e5b..afc7a4d08 100644 --- a/apps/openmw/mwworld/worldimp.cpp +++ b/apps/openmw/mwworld/worldimp.cpp @@ -2327,8 +2327,11 @@ namespace MWWorld void World::hurtStandingActors(const ConstPtr &object, float healthPerSecond) { + /* Disabled by tes3mp, because being in a menu should not pause the game in it + if (MWBase::Environment::get().getWindowManager()->isGuiMode()) return; + */ std::vector actors; mPhysics->getActorsStandingOn(object, actors); @@ -2357,8 +2360,11 @@ namespace MWWorld void World::hurtCollidingActors(const ConstPtr &object, float healthPerSecond) { + /* Disabled by tes3mp, because being in a menu should not pause the game in it + if (MWBase::Environment::get().getWindowManager()->isGuiMode()) return; + */ std::vector actors; mPhysics->getActorsCollidingWith(object, actors);