diff --git a/CHANGELOG.md b/CHANGELOG.md index 1965e0d91e..ef21f17295 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -194,6 +194,7 @@ Bug #8171: Items with more than 100% health can be repaired Bug #8172: Openmw-cs crashes when viewing `Dantooine, Sea` Bug #8187: Intervention effects should use Chebyshev distance to determine the closest marker + Bug #8191: NiRollController does not work for sheath meshes Feature #1415: Infinite fall failsafe Feature #2566: Handle NAM9 records for manual cell references Feature #3501: OpenMW-CS: Instance Editing - Shortcuts for axial locking diff --git a/apps/openmw/mwrender/actoranimation.cpp b/apps/openmw/mwrender/actoranimation.cpp index b4983087b5..73582aa15a 100644 --- a/apps/openmw/mwrender/actoranimation.cpp +++ b/apps/openmw/mwrender/actoranimation.cpp @@ -335,7 +335,8 @@ namespace MWRender // Since throwing weapons stack themselves, do not show such weapon itself int type = weapon->get()->mBase->mData.mType; - if (MWMechanics::getWeaponType(type)->mWeaponClass == ESM::WeaponType::Thrown) + auto weaponClass = MWMechanics::getWeaponType(type)->mWeaponClass; + if (weaponClass == ESM::WeaponType::Thrown) showHolsteredWeapons = false; const VFS::Path::Normalized mesh = weapon->getClass().getCorrectedModel(*weapon); @@ -356,7 +357,7 @@ namespace MWRender const osg::Vec4f glowColor = isEnchanted ? weapon->getClass().getEnchantmentColor(*weapon) : osg::Vec4f(); mScabbard = attachMesh(mesh, boneName, isEnchanted ? &glowColor : nullptr); - if (mScabbard) + if (mScabbard && weaponClass == ESM::WeaponType::Ranged) resetControllers(mScabbard->getNode()); } @@ -364,7 +365,7 @@ namespace MWRender } mScabbard = attachMesh(scabbardName, boneName); - if (mScabbard) + if (mScabbard && weaponClass == ESM::WeaponType::Ranged) resetControllers(mScabbard->getNode()); osg::Group* weaponNode = getBoneByName("Bip01 Weapon"); @@ -386,7 +387,9 @@ namespace MWRender { osg::ref_ptr fallbackNode = mResourceSystem->getSceneManager()->getInstance(mesh, weaponNode); - resetControllers(fallbackNode); + + if (weaponClass == ESM::WeaponType::Ranged) + resetControllers(fallbackNode); } if (isEnchanted)