mirror of
https://github.com/OpenMW/openmw.git
synced 2025-12-02 19:34:34 +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)
|
if (heldIter != inventoryStore.end() && heldIter->getType() == ESM::Light::sRecordId)
|
||||||
{
|
{
|
||||||
// At day, unequip lights and auto equip shields or other suitable items
|
// At day, unequip lights and auto equip shields
|
||||||
// (Note: autoEquip will ignore lights)
|
auto shield = inventoryStore.getPreferredShield();
|
||||||
inventoryStore.autoEquip();
|
if (shield != inventoryStore.end())
|
||||||
|
inventoryStore.equip(MWWorld::InventoryStore::Slot_CarriedLeft, shield);
|
||||||
|
else
|
||||||
|
inventoryStore.unequipSlot(MWWorld::InventoryStore::Slot_CarriedLeft);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue