mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-29 00:32:49 +00:00
Fixed encumberance check (bug #3963)
This commit is contained in:
parent
12871dd8da
commit
325ea10594
@ -1673,9 +1673,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
|
||||
|
Loading…
x
Reference in New Issue
Block a user