1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-05-06 00:11:24 +00:00

Don't allow non-bipedal actors to use non-weapon animations while moving

This commit is contained in:
Evil Eye 2022-07-17 21:47:50 +02:00
parent 7c442926f8
commit 4e65829cec

View file

@ -583,6 +583,8 @@ void CharacterController::refreshMovementAnims(CharacterState movement, bool for
MWRender::Animation::BlendMask movemask = MWRender::Animation::BlendMask_All;
if(isRealWeapon(mWeaponType) || mPtr.getClass().isBipedal(mPtr))
{
std::string weapShortGroup = getWeaponShortGroup(mWeaponType);
if (swimpos == std::string::npos && !weapShortGroup.empty())
{
@ -598,6 +600,7 @@ void CharacterController::refreshMovementAnims(CharacterState movement, bool for
movementAnimName = weapMovementAnimName;
}
}
if (!mAnimation->hasAnimation(movementAnimName))
{