From 430604da6ad5e5fc58068165399aafd491dc598b Mon Sep 17 00:00:00 2001 From: in0finite Date: Sun, 27 Mar 2022 19:45:10 +0200 Subject: [PATCH] ... --- Assets/Scripts/Behaviours/PathfindingManager.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Assets/Scripts/Behaviours/PathfindingManager.cs b/Assets/Scripts/Behaviours/PathfindingManager.cs index 43b47055..ea0cfde8 100644 --- a/Assets/Scripts/Behaviours/PathfindingManager.cs +++ b/Assets/Scripts/Behaviours/PathfindingManager.cs @@ -162,16 +162,16 @@ namespace SanAndreasUnity.Behaviours return FindPathInBackground(closestSourceNode, closestDestinationNode); } - private PathResult FindPathInBackground(PathNode closestSourceNode, PathNode closestDestinationNode) + private PathResult FindPathInBackground(PathNode sourceNode, PathNode destinationNode) { var stopwatch = Stopwatch.StartNew(); PathResult pathResult = new PathResult { IsSuccess = false }; this.RestoreModifiedDatas(); - if (FindPathFromNodeToNode(closestSourceNode.Id, closestDestinationNode.Id)) + if (FindPathFromNodeToNode(sourceNode.Id, destinationNode.Id)) { - pathResult = BuildPath(closestDestinationNode.Id); + pathResult = BuildPath(destinationNode.Id); } int numModifiedDatas = m_modifiedDatas.Count;