Fixed subinventory becoming active in the controlled character's inventory when the slot with the same index is highlighted in a grabbed character's inventory (or vice versa), fixed CPR & grab buttons being drawn on top of subinventories
This commit is contained in:
@@ -169,7 +169,11 @@ namespace Barotrauma
|
||||
|
||||
if (highlightedSubInventorySlot != null)
|
||||
{
|
||||
UpdateSubInventory(deltaTime, highlightedSubInventorySlot.SlotIndex);
|
||||
if (highlightedSubInventorySlot.Inventory == this)
|
||||
{
|
||||
UpdateSubInventory(deltaTime, highlightedSubInventorySlot.SlotIndex);
|
||||
}
|
||||
|
||||
if (highlightedSubInventory.slots == null ||
|
||||
(!highlightedSubInventorySlot.Slot.InteractRect.Contains(PlayerInput.MousePosition) && !highlightedSubInventory.slots.Any(s => s.InteractRect.Contains(PlayerInput.MousePosition))))
|
||||
{
|
||||
@@ -186,6 +190,7 @@ namespace Barotrauma
|
||||
{
|
||||
highlightedSubInventory = subInventory;
|
||||
highlightedSubInventorySlot = selectedSlot;
|
||||
UpdateSubInventory(deltaTime, highlightedSubInventorySlot.SlotIndex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user