mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-17 11:43:25 +00:00
Avoid clearing the current weapon animation group if it's still going to be in use
This commit is contained in:
parent
28c97c22b9
commit
0b38e165f7
@ -390,7 +390,8 @@ void CharacterController::refreshHitRecoilAnims()
|
||||
// Cancel upper body animations
|
||||
if (isKnockedOut() || isKnockedDown())
|
||||
{
|
||||
clearStateAnimation(mCurrentWeapon);
|
||||
if (!mCurrentWeapon.empty())
|
||||
mAnimation->disable(mCurrentWeapon);
|
||||
if (mUpperBodyState > UpperCharState_WeapEquiped)
|
||||
{
|
||||
mUpperBodyState = UpperCharState_WeapEquiped;
|
||||
@ -1148,7 +1149,8 @@ bool CharacterController::updateState(CharacterState idle)
|
||||
if (isStillWeapon && mWeaponType != weaptype && mUpperBodyState > UpperCharState_WeapEquiped)
|
||||
{
|
||||
forcestateupdate = true;
|
||||
clearStateAnimation(mCurrentWeapon);
|
||||
if (!mCurrentWeapon.empty())
|
||||
mAnimation->disable(mCurrentWeapon);
|
||||
mUpperBodyState = UpperCharState_WeapEquiped;
|
||||
setAttackingOrSpell(false);
|
||||
mAnimation->showWeapons(true);
|
||||
@ -1310,7 +1312,8 @@ bool CharacterController::updateState(CharacterState idle)
|
||||
|
||||
if (!ammunition && mUpperBodyState > UpperCharState_WeapEquiped)
|
||||
{
|
||||
clearStateAnimation(mCurrentWeapon);
|
||||
if (!mCurrentWeapon.empty())
|
||||
mAnimation->disable(mCurrentWeapon);
|
||||
mUpperBodyState = UpperCharState_WeapEquiped;
|
||||
}
|
||||
}
|
||||
@ -1591,7 +1594,8 @@ bool CharacterController::updateState(CharacterState idle)
|
||||
if (mWeaponType > ESM::Weapon::None)
|
||||
mAnimation->showWeapons(true);
|
||||
}
|
||||
clearStateAnimation(mCurrentWeapon);
|
||||
if (!mCurrentWeapon.empty())
|
||||
mAnimation->disable(mCurrentWeapon);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user