mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-21 11:53:51 +00:00
Fix idle state reset
This commit is contained in:
parent
eacc185534
commit
86c8fe386b
1 changed files with 8 additions and 3 deletions
|
@ -576,6 +576,13 @@ void CharacterController::refreshMovementAnims(const std::string& weapShortGroup
|
|||
mCurrentMovement = movementAnimName;
|
||||
if(!mCurrentMovement.empty())
|
||||
{
|
||||
if (resetIdle)
|
||||
{
|
||||
mAnimation->disable(mCurrentIdle);
|
||||
mIdleState = CharState_None;
|
||||
idle = CharState_None;
|
||||
}
|
||||
|
||||
// For non-flying creatures, MW uses the Walk animation to calculate the animation velocity
|
||||
// even if we are running. This must be replicated, otherwise the observed speed would differ drastically.
|
||||
std::string anim = mCurrentMovement;
|
||||
|
@ -615,9 +622,6 @@ void CharacterController::refreshMovementAnims(const std::string& weapShortGroup
|
|||
|
||||
mAnimation->play(mCurrentMovement, Priority_Movement, movemask, false,
|
||||
1.f, "start", "stop", startpoint, ~0ul, true);
|
||||
|
||||
if (resetIdle)
|
||||
mAnimation->disable(mCurrentIdle);
|
||||
}
|
||||
else
|
||||
mMovementState = CharState_None;
|
||||
|
@ -1656,6 +1660,7 @@ bool CharacterController::updateWeaponState(CharacterState& idle)
|
|||
mIdleState != CharState_IdleSneak && mIdleState != CharState_IdleSwim)
|
||||
{
|
||||
mAnimation->disable(mCurrentIdle);
|
||||
mIdleState = CharState_None;
|
||||
}
|
||||
|
||||
animPlaying = mAnimation->getInfo(mCurrentWeapon, &complete);
|
||||
|
|
Loading…
Reference in a new issue