1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-03-31 14:36:39 +00:00

Do not show shields in the 1st-person view when shield sheathing is enabled

This commit is contained in:
Andrei Kortunov 2019-11-09 16:45:29 +04:00
parent f335044026
commit 1835a39c57

View file

@ -113,7 +113,7 @@ bool ActorAnimation::updateCarriedLeftVisible(const int weaptype) const
{ {
SceneUtil::FindByNameVisitor findVisitor ("Bip01 AttachShield"); SceneUtil::FindByNameVisitor findVisitor ("Bip01 AttachShield");
mObjectRoot->accept(findVisitor); mObjectRoot->accept(findVisitor);
if (findVisitor.mFoundNode) if (findVisitor.mFoundNode || (mPtr == MWMechanics::getPlayer() && mPtr.isInCell() && MWBase::Environment::get().getWorld()->isFirstPerson()))
{ {
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);