mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-26 09:35:28 +00:00
Don't advance acrobatics skill for NPCs
This commit is contained in:
parent
aa4b2d9504
commit
d49b6f19ff
@ -782,7 +782,7 @@ void CharacterController::update(float duration)
|
||||
|
||||
if(!onground && !flying && !inwater)
|
||||
{
|
||||
// The player is in the air (either getting up —ascending part of jump— or falling).
|
||||
// In the air (either getting up —ascending part of jump— or falling).
|
||||
|
||||
if (world->isSlowFalling(mPtr))
|
||||
{
|
||||
@ -817,8 +817,7 @@ void CharacterController::update(float duration)
|
||||
}
|
||||
else if(vec.z > 0.0f && mJumpState == JumpState_None)
|
||||
{
|
||||
// The player has started a jump.
|
||||
|
||||
// Started a jump.
|
||||
float z = cls.getJump(mPtr);
|
||||
if(vec.x == 0 && vec.y == 0)
|
||||
vec = Ogre::Vector3(0.0f, 0.0f, z);
|
||||
@ -829,6 +828,7 @@ void CharacterController::update(float duration)
|
||||
}
|
||||
|
||||
// advance acrobatics
|
||||
if (mPtr.getRefData().getHandle() == "player")
|
||||
cls.skillUsageSucceeded(mPtr, ESM::Skill::Acrobatics, 0);
|
||||
|
||||
// decrease fatigue
|
||||
@ -843,8 +843,6 @@ void CharacterController::update(float duration)
|
||||
}
|
||||
else if(mJumpState == JumpState_Falling)
|
||||
{
|
||||
// The player is landing.
|
||||
|
||||
forcestateupdate = true;
|
||||
mJumpState = JumpState_Landing;
|
||||
vec.z = 0.0f;
|
||||
@ -861,6 +859,7 @@ void CharacterController::update(float duration)
|
||||
cls.getCreatureStats(mPtr).setHealth(health);
|
||||
|
||||
// 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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user