This commit is contained in:
in0finite 2021-09-19 23:04:23 +02:00
parent 7bad14c09b
commit 214c0291a7

View file

@ -227,30 +227,11 @@ namespace SanAndreasUnity.Behaviours.Peds.AI
{
switch (this.Action)
{
case PedAIAction.Idle:
this.UpdateIdle();
break;
case PedAIAction.WalkingAround:
this.UpdateWalkingAround();
break;
case PedAIAction.Chasing:
this.UpdateChasing();
break;
case PedAIAction.Escaping:
this.UpdateEscaping();
break;
case PedAIAction.Following:
this.UpdateFollowing();
break;
}
}
}
bool ArrivedAtDestinationNode()
{
return ArrivedAtDestinationNode(this.HasTargetNode ? this.TargetNode : (PathNode?)null, this.transform);
}
public static bool ArrivedAtDestinationNode(PathMovementData pathMovementData, Transform tr)
{
if (!pathMovementData.destinationNode.HasValue)
@ -261,16 +242,6 @@ namespace SanAndreasUnity.Behaviours.Peds.AI
return false;
}
private void OnArrivedToDestinationNode()
{
var c = CurrentNode;
var d = TargetNode;
OnArrivedToDestinationNode(ref c, ref d, out Vector3 m);
CurrentNode = c;
TargetNode = d;
_moveDestination = m;
}
public static void OnArrivedToDestinationNode(PathMovementData pathMovementData)
{
if (!pathMovementData.destinationNode.HasValue)