diff --git a/apps/openmw/mwmechanics/character.cpp b/apps/openmw/mwmechanics/character.cpp index b82fc4dc5..c762e6d14 100644 --- a/apps/openmw/mwmechanics/character.cpp +++ b/apps/openmw/mwmechanics/character.cpp @@ -104,7 +104,8 @@ static void getStateInfo(CharacterState state, std::string *group) CharacterController::CharacterController(const MWWorld::Ptr &ptr, MWRender::Animation *anim, CharacterState state, bool loop) - : mPtr(ptr), mAnimation(anim), mCharState(state), mSkipAnim(false), mMovingAnim(false), mSecondsOfRunning(0), mSecondsOfSwimming(0) + : mPtr(ptr), mAnimation(anim), mCharState(state), mSkipAnim(false), mMovingAnim(false), + mSecondsOfRunning(0), mSecondsOfSwimming(0), mSecondsOfFalling(0) { if(!mAnimation) return; @@ -176,10 +177,16 @@ void CharacterController::update(float duration, Movement &movement) } } - /* FIXME: The state should be set to Jump, and X/Y movement should be disallowed except - * for the initial thrust (which would be carried by "physics" until landing). */ + // FIXME: X/Y movement should be disallowed except for the initial thrust (which would be carried by "physics" until landing). if(onground && vec.z > 0.0f) { + //Advance acrobatics on jump + if(getState()!=CharState_Jump) + { + setState(CharState_Jump, true); + MWWorld::Class::get(mPtr).skillUsageSucceeded(mPtr, ESM::Skill::Acrobatics, 0); + } + float x = cls.getJump(mPtr); if(vec.x == 0 && vec.y == 0) diff --git a/apps/openmw/mwmechanics/character.hpp b/apps/openmw/mwmechanics/character.hpp index 4ee217d11..7dfd5d004 100644 --- a/apps/openmw/mwmechanics/character.hpp +++ b/apps/openmw/mwmechanics/character.hpp @@ -82,6 +82,7 @@ class CharacterController // counted for skill increase float mSecondsOfSwimming; float mSecondsOfRunning; + float mSecondsOfFalling; bool mMovingAnim;