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)
|
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))
|
if (world->isSlowFalling(mPtr))
|
||||||
{
|
{
|
||||||
@ -817,8 +817,7 @@ void CharacterController::update(float duration)
|
|||||||
}
|
}
|
||||||
else if(vec.z > 0.0f && mJumpState == JumpState_None)
|
else if(vec.z > 0.0f && mJumpState == JumpState_None)
|
||||||
{
|
{
|
||||||
// The player has started a jump.
|
// Started a jump.
|
||||||
|
|
||||||
float z = cls.getJump(mPtr);
|
float z = cls.getJump(mPtr);
|
||||||
if(vec.x == 0 && vec.y == 0)
|
if(vec.x == 0 && vec.y == 0)
|
||||||
vec = Ogre::Vector3(0.0f, 0.0f, z);
|
vec = Ogre::Vector3(0.0f, 0.0f, z);
|
||||||
@ -829,7 +828,8 @@ void CharacterController::update(float duration)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// advance acrobatics
|
// advance acrobatics
|
||||||
cls.skillUsageSucceeded(mPtr, ESM::Skill::Acrobatics, 0);
|
if (mPtr.getRefData().getHandle() == "player")
|
||||||
|
cls.skillUsageSucceeded(mPtr, ESM::Skill::Acrobatics, 0);
|
||||||
|
|
||||||
// decrease fatigue
|
// decrease fatigue
|
||||||
const MWWorld::Store<ESM::GameSetting> &gmst = world->getStore().get<ESM::GameSetting>();
|
const MWWorld::Store<ESM::GameSetting> &gmst = world->getStore().get<ESM::GameSetting>();
|
||||||
@ -843,8 +843,6 @@ void CharacterController::update(float duration)
|
|||||||
}
|
}
|
||||||
else if(mJumpState == JumpState_Falling)
|
else if(mJumpState == JumpState_Falling)
|
||||||
{
|
{
|
||||||
// The player is landing.
|
|
||||||
|
|
||||||
forcestateupdate = true;
|
forcestateupdate = true;
|
||||||
mJumpState = JumpState_Landing;
|
mJumpState = JumpState_Landing;
|
||||||
vec.z = 0.0f;
|
vec.z = 0.0f;
|
||||||
@ -861,7 +859,8 @@ void CharacterController::update(float duration)
|
|||||||
cls.getCreatureStats(mPtr).setHealth(health);
|
cls.getCreatureStats(mPtr).setHealth(health);
|
||||||
|
|
||||||
// report acrobatics progression
|
// report acrobatics progression
|
||||||
cls.skillUsageSucceeded(mPtr, ESM::Skill::Acrobatics, 1);
|
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))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user