mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-09 12:42:11 +00:00
Cancel upper body animations when knocked down
This commit is contained in:
parent
5349699172
commit
8455ed6279
@ -221,6 +221,21 @@ void CharacterController::refreshCurrentAnims(CharacterState idle, CharacterStat
|
|||||||
mCurrentHit = "shield";
|
mCurrentHit = "shield";
|
||||||
mAnimation->play(mCurrentHit, Priority_Hit, MWRender::Animation::Group_All, true, 1, "block start", "block stop", 0.0f, 0);
|
mAnimation->play(mCurrentHit, Priority_Hit, MWRender::Animation::Group_All, true, 1, "block start", "block stop", 0.0f, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Cancel upper body animations
|
||||||
|
if (mHitState == CharState_KnockDown || mHitState == CharState_KnockOut)
|
||||||
|
{
|
||||||
|
if (mUpperBodyState > UpperCharState_WeapEquiped)
|
||||||
|
{
|
||||||
|
mAnimation->disable(mCurrentWeapon);
|
||||||
|
mUpperBodyState = UpperCharState_WeapEquiped;
|
||||||
|
}
|
||||||
|
else if (mUpperBodyState > UpperCharState_Nothing && mUpperBodyState < UpperCharState_WeapEquiped)
|
||||||
|
{
|
||||||
|
mAnimation->disable(mCurrentWeapon);
|
||||||
|
mUpperBodyState = UpperCharState_Nothing;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if(!mAnimation->isPlaying(mCurrentHit))
|
else if(!mAnimation->isPlaying(mCurrentHit))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user