1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-20 06:23:52 +00:00

Merge pull request #2569 from akortunov/holstered_shield

Ignore shields sheathing for creatures without sheathing bone
This commit is contained in:
Alexei Dobrohotov 2019-10-26 12:00:07 +03:00 committed by GitHub
commit 1f616c5613
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -110,6 +110,10 @@ bool ActorAnimation::updateCarriedLeftVisible(const int weaptype) const
const MWWorld::Class &cls = mPtr.getClass();
MWMechanics::CreatureStats &stats = cls.getCreatureStats(mPtr);
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::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);
}