(a410fd46c) Trying to help the merge script through a jungle of merges
This commit is contained in:
@@ -215,11 +215,12 @@ namespace Barotrauma
|
||||
|
||||
protected virtual void OnCompleted()
|
||||
{
|
||||
if (Completed != null)
|
||||
{
|
||||
Completed();
|
||||
Completed = null;
|
||||
}
|
||||
Completed?.Invoke();
|
||||
//if (Completed != null)
|
||||
//{
|
||||
// Completed();
|
||||
// Completed = null;
|
||||
//}
|
||||
}
|
||||
|
||||
public virtual void Reset() { }
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -156,7 +156,7 @@ namespace Barotrauma
|
||||
bool isRoomNameFound = currentTarget.DisplayName != null;
|
||||
errorMsg = "(Character " + character.Name + " idling, target " + (isRoomNameFound ? currentTarget.DisplayName : currentTarget.ToString()) + ")";
|
||||
#endif
|
||||
var path = PathSteering.PathFinder.FindPath(character.SimPosition, currentTarget.SimPosition, errorMsg);
|
||||
var path = PathSteering.PathFinder.FindPath(character.SimPosition, currentTarget.SimPosition, errorMsgStr: errorMsg);
|
||||
PathSteering.SetPath(path);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user