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

Fixed encumberance check (bug #3963)

This commit is contained in:
Andrei Kortunov 2017-07-25 10:28:33 +04:00
parent 12871dd8da
commit 325ea10594

View file

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