mirror of
https://github.com/OpenMW/openmw.git
synced 2026-01-05 02:43:05 +00:00
Only autoequip the shield in updateEquippedLight (#8404)
This commit is contained in:
parent
e9a9659abc
commit
0892357230
1 changed files with 6 additions and 3 deletions
|
|
@ -1066,9 +1066,12 @@ namespace MWMechanics
|
|||
{
|
||||
if (heldIter != inventoryStore.end() && heldIter->getType() == ESM::Light::sRecordId)
|
||||
{
|
||||
// At day, unequip lights and auto equip shields or other suitable items
|
||||
// (Note: autoEquip will ignore lights)
|
||||
inventoryStore.autoEquip();
|
||||
// At day, unequip lights and auto equip shields
|
||||
auto shield = inventoryStore.getPreferredShield();
|
||||
if (shield != inventoryStore.end())
|
||||
inventoryStore.equip(MWWorld::InventoryStore::Slot_CarriedLeft, shield);
|
||||
else
|
||||
inventoryStore.unequipSlot(MWWorld::InventoryStore::Slot_CarriedLeft);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue