mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-01 18:45:33 +00:00
Shorten diff
This commit is contained in:
parent
4e65829cec
commit
95a074b8aa
1 changed files with 16 additions and 14 deletions
|
@ -583,23 +583,25 @@ void CharacterController::refreshMovementAnims(CharacterState movement, bool for
|
||||||
|
|
||||||
MWRender::Animation::BlendMask movemask = MWRender::Animation::BlendMask_All;
|
MWRender::Animation::BlendMask movemask = MWRender::Animation::BlendMask_All;
|
||||||
|
|
||||||
if(isRealWeapon(mWeaponType) || mPtr.getClass().isBipedal(mPtr))
|
std::string weapShortGroup = getWeaponShortGroup(mWeaponType);
|
||||||
|
|
||||||
|
// Non-biped creatures don't use spellcasting-specific movement animations.
|
||||||
|
if(!isRealWeapon(mWeaponType) && !mPtr.getClass().isBipedal(mPtr))
|
||||||
|
weapShortGroup.clear();
|
||||||
|
|
||||||
|
if (swimpos == std::string::npos && !weapShortGroup.empty())
|
||||||
{
|
{
|
||||||
std::string weapShortGroup = getWeaponShortGroup(mWeaponType);
|
std::string weapMovementAnimName;
|
||||||
if (swimpos == std::string::npos && !weapShortGroup.empty())
|
// Spellcasting stance turning is a special case
|
||||||
{
|
if (mWeaponType == ESM::Weapon::Spell && isTurning())
|
||||||
std::string weapMovementAnimName;
|
weapMovementAnimName = weapShortGroup + movementAnimName;
|
||||||
// Spellcasting stance turning is a special case
|
else
|
||||||
if (mWeaponType == ESM::Weapon::Spell && isTurning())
|
weapMovementAnimName = movementAnimName + weapShortGroup;
|
||||||
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