diff --git a/apps/openmw/mwmechanics/weapontype.hpp b/apps/openmw/mwmechanics/weapontype.hpp index c66c3d836..034e6d6b0 100644 --- a/apps/openmw/mwmechanics/weapontype.hpp +++ b/apps/openmw/mwmechanics/weapontype.hpp @@ -197,7 +197,7 @@ namespace MWMechanics /* short group */ "1h", /* long group */ "bowandarrow", /* sound ID */ "Item Weapon Bow", - /* attach bone */ "Weapon Bone", + /* attach bone */ "Weapon Bone Left", /* sheath bone */ "Bip01 MarksmanBow", /* usage skill */ ESM::Skill::Marksman, /* weapon class*/ ESM::WeaponType::Ranged, diff --git a/apps/openmw/mwrender/creatureanimation.cpp b/apps/openmw/mwrender/creatureanimation.cpp index e38888b23..6bece05ec 100644 --- a/apps/openmw/mwrender/creatureanimation.cpp +++ b/apps/openmw/mwrender/creatureanimation.cpp @@ -119,6 +119,13 @@ void CreatureWeaponAnimation::updatePart(PartHolderPtr& scene, int slot) { int type = item.get()->mBase->mData.mType; bonename = MWMechanics::getWeaponType(type)->mAttachBone; + if (bonename != "Weapon Bone") + { + const NodeMap& nodeMap = getNodeMap(); + NodeMap::const_iterator found = nodeMap.find(Misc::StringUtils::lowerCase(bonename)); + if (found == nodeMap.end()) + bonename = "Weapon Bone"; + } } else bonename = "Weapon Bone"; diff --git a/apps/openmw/mwrender/npcanimation.cpp b/apps/openmw/mwrender/npcanimation.cpp index c6117931e..09c2c8e1c 100644 --- a/apps/openmw/mwrender/npcanimation.cpp +++ b/apps/openmw/mwrender/npcanimation.cpp @@ -745,7 +745,15 @@ bool NpcAnimation::addOrReplaceIndividualPart(ESM::PartReferenceType type, int g if(weapon != inv.end() && weapon->getTypeName() == typeid(ESM::Weapon).name()) { int weaponType = weapon->get()->mBase->mData.mType; - bonename = MWMechanics::getWeaponType(weaponType)->mAttachBone; + const std::string weaponBonename = MWMechanics::getWeaponType(weaponType)->mAttachBone; + + if (weaponBonename != bonename) + { + const NodeMap& nodeMap = getNodeMap(); + NodeMap::const_iterator found = nodeMap.find(Misc::StringUtils::lowerCase(weaponBonename)); + if (found != nodeMap.end()) + bonename = weaponBonename; + } } }