fix normalized encumbrance

This commit is contained in:
scrawl 2012-09-21 17:56:15 +02:00
parent 872fcf3e3d
commit b91d74d394

View file

@ -104,6 +104,8 @@ namespace MWMechanics
float capacity = MWWorld::Class::get(ptr).getCapacity(ptr);
float encumbrance = MWWorld::Class::get(ptr).getEncumbrance(ptr);
float normalizedEncumbrance = (capacity == 0 ? 1 : encumbrance/capacity);
if (normalizedEncumbrance > 1)
normalizedEncumbrance = 1;
float x = fFatigueReturnBase + fFatigueReturnMult * (1 - normalizedEncumbrance);
x *= fEndFatigueMult * endurance;