mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-05 11:45:34 +00:00
Trim down comment and change flag name
This commit is contained in:
parent
bc8db8b8f5
commit
d9376ee08e
1 changed files with 4 additions and 5 deletions
|
@ -92,7 +92,7 @@ namespace MWWorld
|
|||
if (slot == slots_.first.end())
|
||||
{
|
||||
ContainerStoreIterator enchItem = invStore.getSelectedEnchantItem();
|
||||
bool bReEquipEnchItem = false;
|
||||
bool reEquip = false;
|
||||
for (slot = slots_.first.begin(); slot != slots_.first.end(); ++slot)
|
||||
{
|
||||
invStore.unequipSlot(*slot, actor, false);
|
||||
|
@ -105,14 +105,13 @@ namespace MWWorld
|
|||
invStore.equip(*slot, it, actor);
|
||||
}
|
||||
|
||||
//if an enchanted item was re-equipped, set reEquipEnchItem = true
|
||||
//Fix for issue of selected enchated item getting remmoved on cycle
|
||||
if (invStore.getSlot(*slot) == enchItem)
|
||||
{
|
||||
bReEquipEnchItem = true;
|
||||
reEquip = true;
|
||||
}
|
||||
}
|
||||
//if re-equip flag is true, select the enchanted item again
|
||||
if (bReEquipEnchItem)
|
||||
if (reEquip)
|
||||
{
|
||||
invStore.setSelectedEnchantItem(enchItem);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue