graphical exception [temporary solution]
performance fixes minor changes
This commit is contained in:
@@ -20,7 +20,7 @@ private:
|
||||
|
||||
const Grid<Node>& grid;
|
||||
Dijkstra<Node> dijkstra;
|
||||
const DijkstraNode<Node>* dnDest;
|
||||
const DijkstraNode<Node>* dnDest = nullptr;
|
||||
|
||||
struct DijkstraAccess {
|
||||
const Grid<Node>& grid;
|
||||
@@ -58,9 +58,14 @@ public:
|
||||
|
||||
/** get the shortest path from the given start to the configured destination */
|
||||
DijkstraPath<Node> getShortestPath(const Node& start) {
|
||||
|
||||
// destination unknown? -> empty path
|
||||
if (!dnDest) {return DijkstraPath<Node>();}
|
||||
|
||||
const DijkstraNode<Node>* dnStart = dijkstra.getNode(start);
|
||||
const DijkstraPath<Node> path(dnStart, dnDest);
|
||||
return path;
|
||||
|
||||
}
|
||||
|
||||
virtual void updateBefore(WalkState& state, const Node& startNode) override {
|
||||
|
||||
Reference in New Issue
Block a user