Limit difficulty scaling, as mentioned in docs

remotes/1728160796594174844/tmp_0.7.0-alpha
Andrei Kortunov 7 years ago
parent 9e6cba09a6
commit 5b92910829

@ -12,8 +12,10 @@ float scaleDamage(float damage, const MWWorld::Ptr& attacker, const MWWorld::Ptr
{ {
const MWWorld::Ptr& player = MWMechanics::getPlayer(); const MWWorld::Ptr& player = MWMechanics::getPlayer();
// [-100, 100] // [-500, 500]
int difficultySetting = Settings::Manager::getInt("difficulty", "Game"); 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<ESM::GameSetting>().find("fDifficultyMult")->getFloat(); static const float fDifficultyMult = MWBase::Environment::get().getWorld()->getStore().get<ESM::GameSetting>().find("fDifficultyMult")->getFloat();

Loading…
Cancel
Save