(513733e88) Check that the character is inside the same room as the target before repairing/operating an item.
This commit is contained in:
+10
-5
@@ -85,13 +85,18 @@ namespace Barotrauma
|
||||
if (Vector2.Distance(character.Position, target.Item.Position) < target.Item.InteractDistance
|
||||
|| target.Item.IsInsideTrigger(character.WorldPosition))
|
||||
{
|
||||
if (character.SelectedConstruction != target.Item && target.CanBeSelected)
|
||||
if (character.CurrentHull == target.Item.CurrentHull)
|
||||
{
|
||||
target.Item.TryInteract(character, false, true);
|
||||
if (character.SelectedConstruction != target.Item && target.CanBeSelected)
|
||||
{
|
||||
target.Item.TryInteract(character, false, true);
|
||||
}
|
||||
if (component.AIOperate(deltaTime, character, this))
|
||||
{
|
||||
isCompleted = true;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (component.AIOperate(deltaTime, character, this)) isCompleted = true;
|
||||
return;
|
||||
}
|
||||
|
||||
AddSubObjective(gotoObjective = new AIObjectiveGoTo(target.Item, character));
|
||||
|
||||
Reference in New Issue
Block a user