Skip to content

Commit

Permalink
Do not reduce magicka in god mode
Browse files Browse the repository at this point in the history
  • Loading branch information
scrawl committed Feb 21, 2017
1 parent eefe1ed commit a45335f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions apps/openmw/mwworld/worldimp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2659,8 +2659,9 @@ namespace MWWorld
const ESM::Spell* spell = getStore().get<ESM::Spell>().find(selectedSpell);

// Check mana
bool godmode = (isPlayer && getGodModeState());
MWMechanics::DynamicStat<float> magicka = stats.getMagicka();
if (magicka.getCurrent() < spell->mData.mCost && !(isPlayer && getGodModeState()))
if (magicka.getCurrent() < spell->mData.mCost && !godmode)
{
message = "#{sMagicInsufficientSP}";
fail = true;
Expand All @@ -2674,7 +2675,7 @@ namespace MWWorld
}

// Reduce mana
if (!fail)
if (!fail && !godmode)
{
magicka.setCurrent(magicka.getCurrent() - spell->mData.mCost);
stats.setMagicka(magicka);
Expand Down

0 comments on commit a45335f

Please sign in to comment.