(83ad1f3d2) Fix a null reference exception.

This commit is contained in:
Joonas Rikkonen
2019-05-16 05:16:31 +03:00
parent 5b3696f7e4
commit 6bdd0ab8c0
9 changed files with 300 additions and 53 deletions
@@ -679,6 +679,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;