forked from teamnwah/openmw-tes3coop
Merge pull request #1347 from akortunov/encumberancefix
Fixed encumberance check (bug #3963)
This commit is contained in:
commit
d3be4769ea
1 changed files with 3 additions and 2 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue