discornect node
parent
ccfa5a38ed
commit
962d491def
|
@ -434,8 +434,11 @@ namespace OpenSim.Modules.PathFinding
|
|||
PathNode _node = _env.Nodes.Find(X => X.PositionX == (int)_thisNode.Position.X && X.PositionY == (int)_thisNode.Position.Y);
|
||||
|
||||
if(_node == null)
|
||||
{
|
||||
_pathFindingGrid.DisconnectNode(new GridPosition((int)_thisNode.Position.X, (int)_thisNode.Position.Y));
|
||||
_pathFindingGrid.RemoveDiagonalConnectionsIntersectingWithNode(new GridPosition((int)_thisNode.Position.X, (int)_thisNode.Position.Y));
|
||||
}
|
||||
}
|
||||
|
||||
PathFinder pathFinder = new PathFinder();
|
||||
Path _pathFindingPath = pathFinder.FindPath(new GridPosition(_startNode.PositionX, _startNode.PositionY), new GridPosition(_targetNode.PositionX, _targetNode.PositionY), _pathFindingGrid);
|
||||
|
|
Loading…
Reference in New Issue