From 028b528c0bc253ac2446173bfd52406935f2526a Mon Sep 17 00:00:00 2001 From: declan-millar Date: Mon, 21 May 2018 18:16:04 +0100 Subject: [PATCH] Get soul magnitude before checking the rebalance setting --- apps/openmw/mwclass/misc.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/openmw/mwclass/misc.cpp b/apps/openmw/mwclass/misc.cpp index 8e39b44e9..c7e0796d5 100644 --- a/apps/openmw/mwclass/misc.cpp +++ b/apps/openmw/mwclass/misc.cpp @@ -87,10 +87,10 @@ namespace MWClass const ESM::Creature *creature = MWBase::Environment::get().getWorld()->getStore().get().search(ref->mRef.getSoul()); if (creature) { + int soul = creature->mData.mSoul; if (Settings::Manager::getBool("rebalance soulgem values", "Game")) { // use soulgem value rebalance formula from morrowind code patch - int soul = creature->mData.mSoul; float soulValue = 0.0001 * pow(soul, 3) + 2 * soul; // for Azura's star add the unfilled value @@ -100,7 +100,7 @@ namespace MWClass value = soulValue; } else - value *= creature->mData.mSoul; + value *= soul; } }