mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-21 07:53:53 +00:00
Restart idle instantly only after the hit state ends
This commit is contained in:
parent
81e1d72c64
commit
69a1d8ac86
2 changed files with 5 additions and 5 deletions
|
@ -317,7 +317,7 @@ void CharacterController::resetCurrentDeathState()
|
|||
mDeathState = CharState_None;
|
||||
}
|
||||
|
||||
void CharacterController::refreshHitRecoilAnims(CharacterState& idle)
|
||||
void CharacterController::refreshHitRecoilAnims()
|
||||
{
|
||||
auto& charClass = mPtr.getClass();
|
||||
if (!charClass.isActor())
|
||||
|
@ -339,6 +339,7 @@ void CharacterController::refreshHitRecoilAnims(CharacterState& idle)
|
|||
stats.setKnockedDown(false);
|
||||
stats.setHitRecovery(false);
|
||||
stats.setBlock(false);
|
||||
resetCurrentIdleState();
|
||||
}
|
||||
else if (isKnockedOut())
|
||||
mAnimation->setLoopingEnabled(mCurrentHit, knockout);
|
||||
|
@ -392,6 +393,7 @@ void CharacterController::refreshHitRecoilAnims(CharacterState& idle)
|
|||
stats.setKnockedDown(false);
|
||||
stats.setHitRecovery(false);
|
||||
stats.setBlock(false);
|
||||
resetCurrentIdleState();
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -412,8 +414,6 @@ void CharacterController::refreshHitRecoilAnims(CharacterState& idle)
|
|||
}
|
||||
|
||||
mAnimation->play(mCurrentHit, priority, MWRender::Animation::BlendMask_All, true, 1, startKey, stopKey, 0.0f, ~0ul);
|
||||
|
||||
idle = CharState_None;
|
||||
}
|
||||
|
||||
void CharacterController::refreshJumpAnims(JumpingState jump, CharacterState& idle, bool force)
|
||||
|
@ -755,7 +755,7 @@ void CharacterController::refreshCurrentAnims(CharacterState idle, CharacterStat
|
|||
if (isPersistentAnimPlaying())
|
||||
return;
|
||||
|
||||
refreshHitRecoilAnims(idle);
|
||||
refreshHitRecoilAnims();
|
||||
refreshJumpAnims(jump, idle, force);
|
||||
refreshMovementAnims(movement, idle, force);
|
||||
|
||||
|
|
|
@ -204,7 +204,7 @@ class CharacterController : public MWRender::Animation::TextKeyListener
|
|||
void resetCurrentDeathState();
|
||||
|
||||
void refreshCurrentAnims(CharacterState idle, CharacterState movement, JumpingState jump, bool force=false);
|
||||
void refreshHitRecoilAnims(CharacterState& idle);
|
||||
void refreshHitRecoilAnims();
|
||||
void refreshJumpAnims(JumpingState jump, CharacterState& idle, bool force=false);
|
||||
void refreshMovementAnims(CharacterState movement, CharacterState& idle, bool force=false);
|
||||
void refreshIdleAnims(CharacterState idle, bool force=false);
|
||||
|
|
Loading…
Reference in a new issue