mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-26 18:35:20 +00:00
Acrobatics: use calculated fatigueTerm
This commit is contained in:
parent
4c151e59a2
commit
2b992ef3b5
@ -836,9 +836,11 @@ void CharacterController::update(float duration)
|
|||||||
float healthLost = cls.getFallDamage(mPtr, mFallHeight - mPtr.getRefData().getPosition().pos[2]);
|
float healthLost = cls.getFallDamage(mPtr, mFallHeight - mPtr.getRefData().getPosition().pos[2]);
|
||||||
if (healthLost > 0.0f)
|
if (healthLost > 0.0f)
|
||||||
{
|
{
|
||||||
|
const float fatigueTerm = cls.getCreatureStats(mPtr).getFatigueTerm();
|
||||||
|
|
||||||
// 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 * fatigueTerm);
|
||||||
health.setCurrent(health.getCurrent() - realHealthLost);
|
health.setCurrent(health.getCurrent() - realHealthLost);
|
||||||
cls.getCreatureStats(mPtr).setHealth(health);
|
cls.getCreatureStats(mPtr).setHealth(health);
|
||||||
|
|
||||||
@ -846,7 +848,7 @@ void CharacterController::update(float duration)
|
|||||||
cls.skillUsageSucceeded(mPtr, ESM::Skill::Acrobatics, 1);
|
cls.skillUsageSucceeded(mPtr, ESM::Skill::Acrobatics, 1);
|
||||||
|
|
||||||
const float acrobaticsSkill = cls.getNpcStats(mPtr).getSkill(ESM::Skill::Acrobatics).getModified();
|
const float acrobaticsSkill = cls.getNpcStats(mPtr).getSkill(ESM::Skill::Acrobatics).getModified();
|
||||||
if (healthLost > (acrobaticsSkill * 1.25f /* * fatigueTerm */))
|
if (healthLost > (acrobaticsSkill * fatigueTerm))
|
||||||
{
|
{
|
||||||
//TODO: actor falls over
|
//TODO: actor falls over
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user