(ad3954bd2) Moved item HUD closing logic to Character.ControlLocal and removed it from ItemInventory. The deselection in ItemInventory was not synced with the server, causing the item to be immediately reselected after the HUD has been closed (and the logic was redundant anyway because it's also handled in Character).

This commit is contained in:
Joonas Rikkonen
2019-03-29 17:23:33 +02:00
parent ce359f5309
commit af1f8be4fa
3 changed files with 8 additions and 16 deletions
@@ -224,6 +224,13 @@ 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;
SelectedConstruction = null;
}
DoInteractionUpdate(deltaTime, mouseSimPos);
}