(a410fd46c) Trying to help the merge script through a jungle of merges
This commit is contained in:
@@ -181,8 +181,7 @@ namespace Barotrauma
|
||||
{
|
||||
if (closeEnough)
|
||||
{
|
||||
character.AIController.SteeringManager.Reset();
|
||||
character.AnimController.TargetDir = Target.WorldPosition.X > character.WorldPosition.X ? Direction.Right : Direction.Left;
|
||||
OnCompleted();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -204,11 +203,6 @@ namespace Barotrauma
|
||||
}
|
||||
}
|
||||
}
|
||||
if (isCompleted)
|
||||
{
|
||||
character.AIController.SteeringManager.Reset();
|
||||
character.AnimController.TargetDir = Target.WorldPosition.X > character.WorldPosition.X ? Direction.Right : Direction.Left;
|
||||
}
|
||||
return isCompleted;
|
||||
}
|
||||
|
||||
@@ -223,5 +217,15 @@ namespace Barotrauma
|
||||
float interactionDistance = Target is Item i ? i.InteractDistance * 0.9f : 0;
|
||||
CloseEnough = Math.Max(interactionDistance, CloseEnough);
|
||||
}
|
||||
|
||||
protected override void OnCompleted()
|
||||
{
|
||||
character.AIController.SteeringManager.Reset();
|
||||
if (Target != null)
|
||||
{
|
||||
character.AnimController.TargetDir = Target.WorldPosition.X > character.WorldPosition.X ? Direction.Right : Direction.Left;
|
||||
}
|
||||
base.OnCompleted();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user