From 08f998eeb146cc65890a76da46cbad3f2d3d7f98 Mon Sep 17 00:00:00 2001 From: Evil Eye Date: Wed, 18 Jan 2023 19:57:05 +0100 Subject: [PATCH] Delay teleportation till the menu is closed --- apps/openmw/mwmechanics/spelleffects.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/apps/openmw/mwmechanics/spelleffects.cpp b/apps/openmw/mwmechanics/spelleffects.cpp index 1eed6af575..1fed81d91f 100644 --- a/apps/openmw/mwmechanics/spelleffects.cpp +++ b/apps/openmw/mwmechanics/spelleffects.cpp @@ -974,6 +974,13 @@ namespace MWMechanics } else { + // Morrowind.exe doesn't apply magic effects while the menu is open, we do because we like to see stats + // updated instantly. We don't want to teleport instantly though + if (!dt + && (effect.mEffectId == ESM::MagicEffect::Recall + || effect.mEffectId == ESM::MagicEffect::DivineIntervention + || effect.mEffectId == ESM::MagicEffect::AlmsiviIntervention)) + return { MagicApplicationResult::Type::APPLIED, receivedMagicDamage, affectedHealth }; auto& stats = target.getClass().getCreatureStats(target); auto& magnitudes = stats.getMagicEffects(); if (spellParams.getType() != ESM::ActiveSpells::Type_Ability