forked from mirror/openmw-tes3mp
fix normalized encumbrance
This commit is contained in:
parent
872fcf3e3d
commit
b91d74d394
1 changed files with 2 additions and 0 deletions
|
@ -104,6 +104,8 @@ namespace MWMechanics
|
||||||
float capacity = MWWorld::Class::get(ptr).getCapacity(ptr);
|
float capacity = MWWorld::Class::get(ptr).getCapacity(ptr);
|
||||||
float encumbrance = MWWorld::Class::get(ptr).getEncumbrance(ptr);
|
float encumbrance = MWWorld::Class::get(ptr).getEncumbrance(ptr);
|
||||||
float normalizedEncumbrance = (capacity == 0 ? 1 : encumbrance/capacity);
|
float normalizedEncumbrance = (capacity == 0 ? 1 : encumbrance/capacity);
|
||||||
|
if (normalizedEncumbrance > 1)
|
||||||
|
normalizedEncumbrance = 1;
|
||||||
|
|
||||||
float x = fFatigueReturnBase + fFatigueReturnMult * (1 - normalizedEncumbrance);
|
float x = fFatigueReturnBase + fFatigueReturnMult * (1 - normalizedEncumbrance);
|
||||||
x *= fEndFatigueMult * endurance;
|
x *= fEndFatigueMult * endurance;
|
||||||
|
|
Loading…
Reference in a new issue