(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:
@@ -468,6 +468,7 @@ namespace Barotrauma
|
||||
public Item FocusedItem
|
||||
{
|
||||
get { return focusedItem; }
|
||||
set { focusedItem = value; }
|
||||
}
|
||||
|
||||
public Item PickingItem
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user