(797046bbf) Fixed deselecting an item with Esc/E causing the character to interact with whatever the cursor is focused on. TODO: Fix autointeracting causing entities to be selected in MP (e.g. picking up an ammunition box by interacting with the loader causes the loader to be selected)
This commit is contained in:
@@ -226,8 +226,15 @@ namespace Barotrauma
|
||||
|
||||
if (SelectedConstruction != null && SelectedConstruction.ActiveHUDs.Any(ic => ic.GuiFrame != null && HUD.CloseHUD(ic.GuiFrame.Rect)))
|
||||
{
|
||||
//emulate a Select input to get the character to deselect the item server-side
|
||||
keys[(int)InputType.Select].Hit = true;
|
||||
if (GameMain.Client != null)
|
||||
{
|
||||
//emulate a Select input to get the character to deselect the item server-side
|
||||
keys[(int)InputType.Select].Hit = true;
|
||||
}
|
||||
//reset focus to prevent us from accidentally interacting with another entity
|
||||
focusedItem = null;
|
||||
focusedCharacter = null;
|
||||
findFocusedTimer = 0.2f;
|
||||
SelectedConstruction = null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user