1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-18 13:12:50 +00:00

Merge branch 'hackercenturions' into 'master'

Override non-biped follow animation by movement

See merge request OpenMW/openmw!2276
This commit is contained in:
psi29a 2022-08-15 07:58:28 +00:00
commit be947bfcf6

View File

@ -1647,7 +1647,11 @@ bool CharacterController::updateWeaponState()
if (animPlaying)
mAnimation->disable(mCurrentWeapon);
mAnimation->play(mCurrentWeapon, priorityWeapon, MWRender::Animation::BlendMask_All, false, weapSpeed, mAttackType + ' ' + start, mAttackType + ' ' + stop, 0.0f, 0);
MWRender::Animation::AnimPriority priorityFollow(priorityWeapon);
// Follow animations have lower priority than movement for non-biped creatures, logic be damned
if (!cls.isBipedal(mPtr))
priorityFollow = Priority_Default;
mAnimation->play(mCurrentWeapon, priorityFollow, MWRender::Animation::BlendMask_All, false, weapSpeed, mAttackType + ' ' + start, mAttackType + ' ' + stop, 0.0f, 0);
mUpperBodyState = UpperBodyState::AttackEnd;
animPlaying = mAnimation->getInfo(mCurrentWeapon, &complete);