Playing whack-a-mole with the interaction logic again:

- Fixed server keeping clients focused on entities until they report focusing on something else. This allowed clients to interact with the entity they previously focused on, even if they weren't anywhere near anymore.
- Checking if clients are allowed to focus on an entity before letting them do so (!!!).
- Server doesn't highlight entities when a client focuses on them.
- Characters can interact with a wire if they've selected either of the items it's connected to.
This commit is contained in:
Joonas Rikkonen
2017-07-26 21:03:21 +03:00
parent 520e1df1a5
commit 61b90464dd
3 changed files with 49 additions and 14 deletions
@@ -9,11 +9,7 @@ namespace Barotrauma.Items.Components
public override void UpdateHUD(Character character)
{
if (character != Character.Controlled || character != user) return;
if (Screen.Selected != GameMain.EditMapScreen &&
character.IsKeyHit(InputType.Select) &&
character.SelectedConstruction == this.item) character.SelectedConstruction = null;
if (HighlightedWire != null)
{
HighlightedWire.Item.IsHighlighted = true;