1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-19 23:23:52 +00:00

Merge pull request #1373 from 16bitint/jailSkillDecreaseFloor

Ensure jail does not decrease a skill past zero
This commit is contained in:
scrawl 2017-08-04 21:41:47 +00:00 committed by GitHub
commit ec67e7baaf

View file

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