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

Merge pull request #248 from OpenMW/master

Add OpenMW commits up to 26 Jul 2017, part 2
This commit is contained in:
David Cernat 2017-07-26 20:31:39 +03:00 committed by GitHub
commit e6e5d406b8

View file

@ -1761,9 +1761,10 @@ void CharacterController::update(float duration)
static const float fFatigueSneakBase = gmst.find("fFatigueSneakBase")->getFloat();
static const float fFatigueSneakMult = gmst.find("fFatigueSneakMult")->getFloat();
const float encumbrance = cls.getEncumbrance(mPtr) / cls.getCapacity(mPtr);
if (encumbrance < 1)
if (cls.getEncumbrance(mPtr) <= cls.getCapacity(mPtr))
{
const float encumbrance = cls.getEncumbrance(mPtr) / cls.getCapacity(mPtr);
if (sneak)
fatigueLoss = fFatigueSneakBase + encumbrance * fFatigueSneakMult;
else