mirror of
https://github.com/OpenMW/openmw.git
synced 2025-12-02 16:34:31 +00:00
Merge branch 'defendingthelight' into 'master'
Only autoequip the shield in updateEquippedLight (#8404) Closes #8404 See merge request OpenMW/openmw!4763
This commit is contained in:
commit
3b42874797
1 changed files with 6 additions and 3 deletions
|
|
@ -1062,9 +1062,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