diff --git a/apps/openmw/mwmechanics/actors.cpp b/apps/openmw/mwmechanics/actors.cpp index efca99b4e..cbc43636c 100644 --- a/apps/openmw/mwmechanics/actors.cpp +++ b/apps/openmw/mwmechanics/actors.cpp @@ -470,13 +470,13 @@ namespace MWMechanics return; MWMechanics::CreatureStats& stats = ptr.getClass().getCreatureStats (ptr); - const MWWorld::Store& settings = MWBase::Environment::get().getWorld()->getStore().get(); int endurance = stats.getAttribute (ESM::Attribute::Endurance).getModified (); // restore fatigue - float fFatigueReturnBase = settings.find("fFatigueReturnBase")->getFloat (); - float fFatigueReturnMult = settings.find("fFatigueReturnMult")->getFloat (); + const MWWorld::Store& settings = MWBase::Environment::get().getWorld()->getStore().get(); + static float fFatigueReturnBase = settings.find("fFatigueReturnBase")->getFloat (); + static float fFatigueReturnMult = settings.find("fFatigueReturnMult")->getFloat (); float x = fFatigueReturnBase + fFatigueReturnMult * endurance;