mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-20 05:53:50 +00:00
Advance acrobatics on jump
This commit is contained in:
parent
61e476118d
commit
add3cd6456
2 changed files with 11 additions and 3 deletions
|
@ -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)
|
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)
|
if(!mAnimation)
|
||||||
return;
|
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
|
// FIXME: X/Y movement should be disallowed except for the initial thrust (which would be carried by "physics" until landing).
|
||||||
* for the initial thrust (which would be carried by "physics" until landing). */
|
|
||||||
if(onground && vec.z > 0.0f)
|
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);
|
float x = cls.getJump(mPtr);
|
||||||
|
|
||||||
if(vec.x == 0 && vec.y == 0)
|
if(vec.x == 0 && vec.y == 0)
|
||||||
|
|
|
@ -82,6 +82,7 @@ class CharacterController
|
||||||
// counted for skill increase
|
// counted for skill increase
|
||||||
float mSecondsOfSwimming;
|
float mSecondsOfSwimming;
|
||||||
float mSecondsOfRunning;
|
float mSecondsOfRunning;
|
||||||
|
float mSecondsOfFalling;
|
||||||
|
|
||||||
bool mMovingAnim;
|
bool mMovingAnim;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue