mirror of
https://github.com/OpenMW/openmw.git
synced 2025-05-06 09:41:24 +00:00
Don't allow non-bipedal actors to use non-weapon animations while moving
This commit is contained in:
parent
7c442926f8
commit
4e65829cec
1 changed files with 14 additions and 11 deletions
|
@ -583,20 +583,23 @@ void CharacterController::refreshMovementAnims(CharacterState movement, bool for
|
||||||
|
|
||||||
MWRender::Animation::BlendMask movemask = MWRender::Animation::BlendMask_All;
|
MWRender::Animation::BlendMask movemask = MWRender::Animation::BlendMask_All;
|
||||||
|
|
||||||
std::string weapShortGroup = getWeaponShortGroup(mWeaponType);
|
if(isRealWeapon(mWeaponType) || mPtr.getClass().isBipedal(mPtr))
|
||||||
if (swimpos == std::string::npos && !weapShortGroup.empty())
|
|
||||||
{
|
{
|
||||||
std::string weapMovementAnimName;
|
std::string weapShortGroup = getWeaponShortGroup(mWeaponType);
|
||||||
// Spellcasting stance turning is a special case
|
if (swimpos == std::string::npos && !weapShortGroup.empty())
|
||||||
if (mWeaponType == ESM::Weapon::Spell && isTurning())
|
{
|
||||||
weapMovementAnimName = weapShortGroup + movementAnimName;
|
std::string weapMovementAnimName;
|
||||||
else
|
// Spellcasting stance turning is a special case
|
||||||
weapMovementAnimName = movementAnimName + weapShortGroup;
|
if (mWeaponType == ESM::Weapon::Spell && isTurning())
|
||||||
|
weapMovementAnimName = weapShortGroup + movementAnimName;
|
||||||
|
else
|
||||||
|
weapMovementAnimName = movementAnimName + weapShortGroup;
|
||||||
|
|
||||||
if (!mAnimation->hasAnimation(weapMovementAnimName))
|
if (!mAnimation->hasAnimation(weapMovementAnimName))
|
||||||
weapMovementAnimName = fallbackShortWeaponGroup(movementAnimName, &movemask);
|
weapMovementAnimName = fallbackShortWeaponGroup(movementAnimName, &movemask);
|
||||||
|
|
||||||
movementAnimName = weapMovementAnimName;
|
movementAnimName = weapMovementAnimName;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!mAnimation->hasAnimation(movementAnimName))
|
if (!mAnimation->hasAnimation(movementAnimName))
|
||||||
|
|
Loading…
Reference in a new issue