1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2026-01-05 03:43:09 +00:00

Only autoequip the shield in updateEquippedLight (#8404)

This commit is contained in:
Alexei Kotov 2025-07-08 20:32:20 +03:00
parent e9a9659abc
commit 0892357230

View file

@ -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);
}
}
}