Fixed subinventory staying visible if the slot containing the subinventory gets merged while it's highlighted (e.g. put a stun baton in either hand and swap it with a two-hand item)

This commit is contained in:
Joonas Rikkonen
2018-02-13 13:49:41 +02:00
parent 055bf13f59
commit 4d01aba0f1

View File

@@ -237,6 +237,7 @@ namespace Barotrauma
{
for (int i = 0; i < capacity - 1; i++)
{
slots[i].State = GUIComponent.ComponentState.None;
if (slots[i].Disabled || Items[i] == null) continue;
for (int n = i + 1; n < capacity; n++)
@@ -250,6 +251,8 @@ namespace Barotrauma
}
}
highlightedSubInventory = null;
highlightedSubInventorySlot = null;
selectedSlot = null;
}