From 9b28420875073486ff55bc3f5bc1b78a559d3176 Mon Sep 17 00:00:00 2001 From: capostrophic Date: Sun, 5 Jan 2020 23:30:22 +0300 Subject: [PATCH] [Regression] Make creatures autoequip shields properly again --- apps/openmw/mwworld/inventorystore.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/apps/openmw/mwworld/inventorystore.cpp b/apps/openmw/mwworld/inventorystore.cpp index 094d1c8ec..1c8062011 100644 --- a/apps/openmw/mwworld/inventorystore.cpp +++ b/apps/openmw/mwworld/inventorystore.cpp @@ -504,14 +504,10 @@ void MWWorld::InventoryStore::autoEquipShield(const MWWorld::Ptr& actor, TSlots& continue; if (iter->getClass().canBeEquipped(*iter, actor).first != 1) continue; - if (iter->getClass().getItemHealth(*iter) <= 0) - continue; std::pair, bool> shieldSlots = iter->getClass().getEquipmentSlots(*iter); - if (shieldSlots.first.empty()) - continue; int slot = shieldSlots.first[0]; - const ContainerStoreIterator& shield = mSlots[slot]; + const ContainerStoreIterator& shield = slots_[slot]; if (shield != end() && shield.getType() == Type_Armor && shield->get()->mBase->mData.mType == ESM::Armor::Shield) {