1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-02-04 11:15:32 +00:00

Ignore shields sheathing for creatures without sheathing bone

This commit is contained in:
Andrei Kortunov 2019-10-26 12:41:16 +04:00
parent 9f039fac87
commit 7cd4fa4706

View file

@ -110,6 +110,10 @@ bool ActorAnimation::updateCarriedLeftVisible(const int weaptype) const
const MWWorld::Class &cls = mPtr.getClass(); const MWWorld::Class &cls = mPtr.getClass();
MWMechanics::CreatureStats &stats = cls.getCreatureStats(mPtr); MWMechanics::CreatureStats &stats = cls.getCreatureStats(mPtr);
if (cls.hasInventoryStore(mPtr) && weaptype != ESM::Weapon::Spell) if (cls.hasInventoryStore(mPtr) && weaptype != ESM::Weapon::Spell)
{
SceneUtil::FindByNameVisitor findVisitor ("Bip01 AttachShield");
mObjectRoot->accept(findVisitor);
if (findVisitor.mFoundNode)
{ {
const MWWorld::InventoryStore& inv = cls.getInventoryStore(mPtr); const MWWorld::InventoryStore& inv = cls.getInventoryStore(mPtr);
const MWWorld::ConstContainerStoreIterator weapon = inv.getSlot(MWWorld::InventoryStore::Slot_CarriedRight); const MWWorld::ConstContainerStoreIterator weapon = inv.getSlot(MWWorld::InventoryStore::Slot_CarriedRight);
@ -134,6 +138,7 @@ bool ActorAnimation::updateCarriedLeftVisible(const int weaptype) const
} }
} }
} }
}
return !(MWMechanics::getWeaponType(weaptype)->mFlags & ESM::WeaponType::TwoHanded); return !(MWMechanics::getWeaponType(weaptype)->mFlags & ESM::WeaponType::TwoHanded);
} }