(513733e88) Check that the character is inside the same room as the target before repairing/operating an item.

This commit is contained in:
Joonas Rikkonen
2019-05-03 13:47:39 +03:00
parent 1ff1584be5
commit 5031432e77
6 changed files with 321 additions and 59 deletions
@@ -354,6 +354,19 @@ namespace Barotrauma.Items.Components
return true;
}
public override void OnItemLoaded()
{
sonar = item.GetComponent<Sonar>();
}
public override bool Select(Character character)
{
if (!CanBeSelected) return false;
user = character;
return true;
}
public override void Update(float deltaTime, Camera cam)
{
networkUpdateTimer -= deltaTime;