(2eca8483c) Refactor CanSeeCharacter method and implement CanSeeTarget method. If we check whether or not we can see a character, it should now check if any of the limbs can be seen instead of always checking the head/torso etc. Not tested.

This commit is contained in:
Joonas Rikkonen
2019-05-03 13:45:58 +03:00
parent 953b5690ec
commit e0732e6d57
5 changed files with 369 additions and 102 deletions
@@ -276,6 +276,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;