(86280d29b) Merge branch 'dev' of github.com:Regalis11/Barotrauma-development into dev

This commit is contained in:
Joonas Rikkonen
2019-05-16 06:31:49 +03:00
parent fc22eb5088
commit 80c563e7b0
23 changed files with 296 additions and 295 deletions
@@ -67,9 +67,7 @@ namespace Barotrauma
}
if (target.CanBeSelected)
{
bool inSameRoom = character.CurrentHull == target.Item.CurrentHull;
bool withinReach = target.Item.IsInsideTrigger(character.WorldPosition) || Vector2.DistanceSquared(character.Position, target.Item.Position) < MathUtils.Pow(target.Item.InteractDistance, 2);
if (inSameRoom && withinReach)
if (character.CanInteractWith(target.Item, out _, checkLinked: false))
{
if (character.SelectedConstruction != target.Item)
{
@@ -535,6 +533,10 @@ namespace Barotrauma
{
isCompleted = true;
}
if (component.AIOperate(deltaTime, character, this))
{
isCompleted = true;
}
}
else
{