1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-04 02:41:19 +00:00

Ensure jail does not decrease a skill past zero

This commit is contained in:
Jake Westrip 2017-08-05 06:15:15 +10:00
parent a78f254883
commit 63343b6241

View File

@ -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>();