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:
commit
1f616c5613
1 changed files with 20 additions and 15 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue