mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-30 16:45:17 -04:00
Implement fatigue restoration to match Morrowind.
Fatigue restoration doesn't depend on encuberance or EndFatigueMult.
This commit is contained in:
parent
91afc2ebe7
commit
432fb751bf
@ -326,11 +326,9 @@ namespace MWMechanics
|
|||||||
// restore fatigue
|
// restore fatigue
|
||||||
float fFatigueReturnBase = settings.find("fFatigueReturnBase")->getFloat ();
|
float fFatigueReturnBase = settings.find("fFatigueReturnBase")->getFloat ();
|
||||||
float fFatigueReturnMult = settings.find("fFatigueReturnMult")->getFloat ();
|
float fFatigueReturnMult = settings.find("fFatigueReturnMult")->getFloat ();
|
||||||
float fEndFatigueMult = settings.find("fEndFatigueMult")->getFloat ();
|
|
||||||
|
|
||||||
float x = fFatigueReturnBase + fFatigueReturnMult * (1 - normalizedEncumbrance);
|
|
||||||
x *= fEndFatigueMult * endurance;
|
|
||||||
|
|
||||||
|
float x = fFatigueReturnBase + fFatigueReturnMult * endurance;
|
||||||
|
|
||||||
DynamicStat<float> fatigue = stats.getFatigue();
|
DynamicStat<float> fatigue = stats.getFatigue();
|
||||||
fatigue.setCurrent (fatigue.getCurrent() + duration * x);
|
fatigue.setCurrent (fatigue.getCurrent() + duration * x);
|
||||||
stats.setFatigue (fatigue);
|
stats.setFatigue (fatigue);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user