|
|
|
@ -157,7 +157,7 @@ namespace MWMechanics
|
|
|
|
|
int endurance = getAttribute(ESM::Attribute::Endurance).getModified();
|
|
|
|
|
DynamicStat<float> fatigue = getFatigue();
|
|
|
|
|
float diff = (strength+willpower+agility+endurance) - fatigue.getBase();
|
|
|
|
|
float currentToBaseRatio = (fatigue.getCurrent() / fatigue.getBase());
|
|
|
|
|
float currentToBaseRatio = fatigue.getBase() > 0 ? (fatigue.getCurrent() / fatigue.getBase()) : 0;
|
|
|
|
|
fatigue.setModified(fatigue.getModified() + diff, 0);
|
|
|
|
|
fatigue.setCurrent(fatigue.getBase() * currentToBaseRatio);
|
|
|
|
|
setFatigue(fatigue);
|
|
|
|
|