(11190239d) Fixed autointeracting with contained items causing the parent to be selected in MP (e.g. picking up an ammunition box by interacting with the loader caused the loader to be selected)

This commit is contained in:
Joonas Rikkonen
2019-03-29 17:26:54 +02:00
parent 902e5e4493
commit c80a3d1d5d
2 changed files with 3 additions and 0 deletions

View File

@@ -468,6 +468,7 @@ namespace Barotrauma
public Item FocusedItem
{
get { return focusedItem; }
set { focusedItem = value; }
}
public Item PickingItem

View File

@@ -162,6 +162,7 @@ namespace Barotrauma.Items.Components
if (contained == null) continue;
if (contained.TryInteract(character))
{
character.FocusedItem = contained;
return false;
}
}
@@ -178,6 +179,7 @@ namespace Barotrauma.Items.Components
if (contained == null) continue;
if (contained.TryInteract(picker))
{
picker.FocusedItem = contained;
return true;
}
}