1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-03-17 19:20:49 +00:00

Merge branch 'no_hugs' into 'master'

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

Closes #6868

See merge request OpenMW/openmw!2153
This commit is contained in:
Alexei Kotov 2022-07-26 14:48:54 +00:00
commit 45a94bdf32

View File

@ -584,6 +584,11 @@ void CharacterController::refreshMovementAnims(CharacterState movement, bool for
MWRender::Animation::BlendMask movemask = MWRender::Animation::BlendMask_All;
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 weapMovementAnimName;