From a45335ffc3f283b7f30478f1dfddb66126da93a4 Mon Sep 17 00:00:00 2001 From: scrawl Date: Tue, 21 Feb 2017 16:33:18 +0100 Subject: [PATCH] Do not reduce magicka in god mode --- apps/openmw/mwworld/worldimp.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/openmw/mwworld/worldimp.cpp b/apps/openmw/mwworld/worldimp.cpp index 91e10dca1..3d9300264 100644 --- a/apps/openmw/mwworld/worldimp.cpp +++ b/apps/openmw/mwworld/worldimp.cpp @@ -2659,8 +2659,9 @@ namespace MWWorld const ESM::Spell* spell = getStore().get().find(selectedSpell); // Check mana + bool godmode = (isPlayer && getGodModeState()); MWMechanics::DynamicStat magicka = stats.getMagicka(); - if (magicka.getCurrent() < spell->mData.mCost && !(isPlayer && getGodModeState())) + if (magicka.getCurrent() < spell->mData.mCost && !godmode) { message = "#{sMagicInsufficientSP}"; fail = true; @@ -2674,7 +2675,7 @@ namespace MWWorld } // Reduce mana - if (!fail) + if (!fail && !godmode) { magicka.setCurrent(magicka.getCurrent() - spell->mData.mCost); stats.setMagicka(magicka);