mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-01 07:13:22 +00:00
Don't allow non-bipedal actors to use non-weapon animations while moving
This commit is contained in:
parent
7c442926f8
commit
4e65829cec
@ -583,20 +583,23 @@ void CharacterController::refreshMovementAnims(CharacterState movement, bool for
|
||||
|
||||
MWRender::Animation::BlendMask movemask = MWRender::Animation::BlendMask_All;
|
||||
|
||||
std::string weapShortGroup = getWeaponShortGroup(mWeaponType);
|
||||
if (swimpos == std::string::npos && !weapShortGroup.empty())
|
||||
if(isRealWeapon(mWeaponType) || mPtr.getClass().isBipedal(mPtr))
|
||||
{
|
||||
std::string weapMovementAnimName;
|
||||
// Spellcasting stance turning is a special case
|
||||
if (mWeaponType == ESM::Weapon::Spell && isTurning())
|
||||
weapMovementAnimName = weapShortGroup + movementAnimName;
|
||||
else
|
||||
weapMovementAnimName = movementAnimName + weapShortGroup;
|
||||
std::string weapShortGroup = getWeaponShortGroup(mWeaponType);
|
||||
if (swimpos == std::string::npos && !weapShortGroup.empty())
|
||||
{
|
||||
std::string weapMovementAnimName;
|
||||
// Spellcasting stance turning is a special case
|
||||
if (mWeaponType == ESM::Weapon::Spell && isTurning())
|
||||
weapMovementAnimName = weapShortGroup + movementAnimName;
|
||||
else
|
||||
weapMovementAnimName = movementAnimName + weapShortGroup;
|
||||
|
||||
if (!mAnimation->hasAnimation(weapMovementAnimName))
|
||||
weapMovementAnimName = fallbackShortWeaponGroup(movementAnimName, &movemask);
|
||||
if (!mAnimation->hasAnimation(weapMovementAnimName))
|
||||
weapMovementAnimName = fallbackShortWeaponGroup(movementAnimName, &movemask);
|
||||
|
||||
movementAnimName = weapMovementAnimName;
|
||||
movementAnimName = weapMovementAnimName;
|
||||
}
|
||||
}
|
||||
|
||||
if (!mAnimation->hasAnimation(movementAnimName))
|
||||
|
Loading…
x
Reference in New Issue
Block a user