mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-25 06:35:30 +00:00
Advance acrobatics on jump
This commit is contained in:
parent
61e476118d
commit
add3cd6456
@ -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)
|
||||
|
@ -82,6 +82,7 @@ class CharacterController
|
||||
// counted for skill increase
|
||||
float mSecondsOfSwimming;
|
||||
float mSecondsOfRunning;
|
||||
float mSecondsOfFalling;
|
||||
|
||||
bool mMovingAnim;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user