diff --git a/apps/openmw/mwscript/interpretercontext.cpp b/apps/openmw/mwscript/interpretercontext.cpp index 9a810e0e3..fd5ffae00 100644 --- a/apps/openmw/mwscript/interpretercontext.cpp +++ b/apps/openmw/mwscript/interpretercontext.cpp @@ -270,12 +270,16 @@ namespace MWScript bool InterpreterContext::menuMode() { - /* Disabled by tes3mp, because being in a menu should not pause scripts in it + /* + Start of tes3mp change (major) - return MWBase::Environment::get().getWindowManager()->isGuiMode(); + Being in a menu should not pause scripts in multiplayer, so always return false */ - + //return MWBase::Environment::get().getWindowManager()->isGuiMode(); return false; + /* + End of tes3mp change (major) + */ } int InterpreterContext::getGlobalShort (const std::string& name) const @@ -672,10 +676,17 @@ namespace MWScript Locals& locals = getMemberLocals (scriptId, global); - // Added by tes3mp so it can be reused by it + /* + Start of tes3mp change (minor) + + Declare an integer so it can be reused below for multiplayer script sync purposes + */ int index = findLocalVariableIndex(scriptId, name, 's'); locals.mShorts[index] = value; + /* + End of tes3mp change (minor) + */ /* Start of tes3mp addition diff --git a/apps/openmw/mwworld/worldimp.cpp b/apps/openmw/mwworld/worldimp.cpp index 423b16d3a..b75a0da58 100644 --- a/apps/openmw/mwworld/worldimp.cpp +++ b/apps/openmw/mwworld/worldimp.cpp @@ -278,10 +278,11 @@ namespace MWWorld { ESM::Position pos; - // Major change made by tes3mp - // - // If Pelagiad exists, spawn there; otherwise, spawn at 0,0 + /* + Start of tes3mp change (major) + If Pelagiad exists, spawn there; otherwise, spawn at 0 ,0 + */ if (findExteriorPosition("Pelagiad", pos)) { changeToExteriorCell(pos, true); @@ -298,6 +299,9 @@ namespace MWWorld pos.rot[2] = 0; mWorldScene->changeToExteriorCell(pos, true); } + /* + End of tes3mp change (major) + */ } } @@ -2557,10 +2561,16 @@ 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 + /* + Start of tes3mp change (major) - if (MWBase::Environment::get().getWindowManager()->isGuiMode()) - return; + Being in a menu should not prevent actors from being hurt in multiplayer, + so that check has been commented out + */ + //if (MWBase::Environment::get().getWindowManager()->isGuiMode()) + // return; + /* + End of tes3mp change (major) */ std::vector actors; @@ -2594,10 +2604,16 @@ 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 + /* + Start of tes3mp change (major) - if (MWBase::Environment::get().getWindowManager()->isGuiMode()) - return; + Being in a menu should not prevent actors from being hurt in multiplayer, + so that check has been commented out + */ + //if (MWBase::Environment::get().getWindowManager()->isGuiMode()) + // return; + /* + End of tes3mp change (major) */ std::vector actors;