Skip to content

Commit

Permalink
Fixed bug
Browse files Browse the repository at this point in the history
  • Loading branch information
optiklab committed Jul 15, 2023
1 parent 9468196 commit ec67b5b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions aStarQueue.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,14 @@ class aStarQueue : public pathFindingBase

if (minimum > newDistance + euristic)
{
minimum = newDistance;
minimum = newDistance + euristic;
minimumNode = to;
}
}

if (minimumNode != -1)
{
remove(_queue.begin(), _queue.end(), minimumNode);
_queue.erase(remove(_queue.begin(), _queue.end(), minimumNode), _queue.end());
}

return minimumNode;
Expand Down

0 comments on commit ec67b5b

Please sign in to comment.