From 5b929108299a474c7fbc28042346f4f78282a806 Mon Sep 17 00:00:00 2001 From: Andrei Kortunov Date: Tue, 31 Jul 2018 21:14:16 +0400 Subject: [PATCH] Limit difficulty scaling, as mentioned in docs --- apps/openmw/mwmechanics/difficultyscaling.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/openmw/mwmechanics/difficultyscaling.cpp b/apps/openmw/mwmechanics/difficultyscaling.cpp index 693587eda..53cf47dea 100644 --- a/apps/openmw/mwmechanics/difficultyscaling.cpp +++ b/apps/openmw/mwmechanics/difficultyscaling.cpp @@ -12,8 +12,10 @@ float scaleDamage(float damage, const MWWorld::Ptr& attacker, const MWWorld::Ptr { const MWWorld::Ptr& player = MWMechanics::getPlayer(); - // [-100, 100] + // [-500, 500] int difficultySetting = Settings::Manager::getInt("difficulty", "Game"); + difficultySetting = std::min(difficultySetting, 500); + difficultySetting = std::max(difficultySetting, -500); static const float fDifficultyMult = MWBase::Environment::get().getWorld()->getStore().get().find("fDifficultyMult")->getFloat();