mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-04-01 11:06:41 +00:00
Minor acrobatics fixes
This commit is contained in:
parent
28a2585106
commit
7534fc968d
1 changed files with 7 additions and 5 deletions
|
@ -1017,14 +1017,16 @@ void CharacterController::update(float duration)
|
||||||
cls.getCreatureStats(mPtr).setHealth(health);
|
cls.getCreatureStats(mPtr).setHealth(health);
|
||||||
cls.onHit(mPtr, realHealthLost, true, MWWorld::Ptr(), MWWorld::Ptr(), true);
|
cls.onHit(mPtr, realHealthLost, true, MWWorld::Ptr(), MWWorld::Ptr(), true);
|
||||||
|
|
||||||
// report acrobatics progression
|
|
||||||
if (mPtr.getRefData().getHandle() == "player")
|
|
||||||
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 * fatigueTerm))
|
if (healthLost > (acrobaticsSkill * fatigueTerm))
|
||||||
{
|
{
|
||||||
//TODO: actor falls over
|
cls.getCreatureStats(mPtr).setKnockedDown(true);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// report acrobatics progression
|
||||||
|
if (mPtr.getRefData().getHandle() == "player")
|
||||||
|
cls.skillUsageSucceeded(mPtr, ESM::Skill::Acrobatics, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue