mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-26 18:35:20 +00:00
Acrobatics: do not touch modified stats
This commit is contained in:
parent
4860514865
commit
4c151e59a2
@ -822,7 +822,6 @@ void CharacterController::update(float duration)
|
|||||||
const float normalizedEncumbrance = cls.getEncumbrance(mPtr) / cls.getCapacity(mPtr);
|
const float normalizedEncumbrance = cls.getEncumbrance(mPtr) / cls.getCapacity(mPtr);
|
||||||
const int fatigueDecrease = fatigueJumpBase + (1 - normalizedEncumbrance) * fatigueJumpMult;
|
const int fatigueDecrease = fatigueJumpBase + (1 - normalizedEncumbrance) * fatigueJumpMult;
|
||||||
DynamicStat<float> fatigue = cls.getCreatureStats(mPtr).getFatigue();
|
DynamicStat<float> fatigue = cls.getCreatureStats(mPtr).getFatigue();
|
||||||
fatigue.setModified(fatigue.getModified() - fatigueDecrease, 0);
|
|
||||||
fatigue.setCurrent(fatigue.getCurrent() - fatigueDecrease);
|
fatigue.setCurrent(fatigue.getCurrent() - fatigueDecrease);
|
||||||
cls.getCreatureStats(mPtr).setFatigue(fatigue);
|
cls.getCreatureStats(mPtr).setFatigue(fatigue);
|
||||||
}
|
}
|
||||||
@ -840,7 +839,6 @@ void CharacterController::update(float duration)
|
|||||||
// inflict fall damages
|
// inflict fall damages
|
||||||
DynamicStat<float> health = cls.getCreatureStats(mPtr).getHealth();
|
DynamicStat<float> health = cls.getCreatureStats(mPtr).getHealth();
|
||||||
int realHealthLost = healthLost * (1.0f - 0.25 * 1.25f /* * fatigueTerm */);
|
int realHealthLost = healthLost * (1.0f - 0.25 * 1.25f /* * fatigueTerm */);
|
||||||
health.setModified(health.getModified() - realHealthLost, 0);
|
|
||||||
health.setCurrent(health.getCurrent() - realHealthLost);
|
health.setCurrent(health.getCurrent() - realHealthLost);
|
||||||
cls.getCreatureStats(mPtr).setHealth(health);
|
cls.getCreatureStats(mPtr).setHealth(health);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user