From ddad4d9370a4d094ce6cc543fd386611c0519761 Mon Sep 17 00:00:00 2001 From: Christopher Date: Tue, 23 Jun 2020 08:30:32 +0200 Subject: [PATCH] add last node --- src/BasicPathFinding.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/BasicPathFinding.cs b/src/BasicPathFinding.cs index 1fd560f..b4fefe6 100644 --- a/src/BasicPathFinding.cs +++ b/src/BasicPathFinding.cs @@ -452,11 +452,14 @@ namespace OpenSim.Modules.PathFinding if(lastX != (int)_thisEdge.End.Position.X && lastY != (int)_thisEdge.End.Position.Y) { _pathString += "<" + _thisEdge.End.Position.X + ", " + _thisEdge.End.Position.Y + ", 0>;"; + lastX = (int)_thisEdge.End.Position.X; lastY = (int)_thisEdge.End.Position.Y; } } - + + _pathString += "<" + _pathFindingPath.Edges[_pathFindingPath.Edges.Count-1].End.Position.X + ", " + _pathFindingPath.Edges[_pathFindingPath.Edges.Count - 1].End.Position.Y + ", 0>;"; + if (_pathFindingPath.Type == PathType.Complete) {