Merge pull request #1373 from 16bitint/jailSkillDecreaseFloor

Ensure jail does not decrease a skill past zero
pull/280/head
scrawl 8 years ago committed by GitHub
commit ec67e7baaf

@ -93,7 +93,7 @@ namespace MWGui
if (skill == ESM::Skill::Security || skill == ESM::Skill::Sneak)
value.setBase(std::min(100, value.getBase()+1));
else
value.setBase(value.getBase()-1);
value.setBase(std::max(0, value.getBase()-1));
}
const MWWorld::Store<ESM::GameSetting>& gmst = MWBase::Environment::get().getWorld()->getStore().get<ESM::GameSetting>();

Loading…
Cancel
Save