summaryrefslogtreecommitdiff
path: root/src/pathfinder/npf/aystar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/pathfinder/npf/aystar.cpp')
-rw-r--r--src/pathfinder/npf/aystar.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pathfinder/npf/aystar.cpp b/src/pathfinder/npf/aystar.cpp
index 8bd63beb7..beac06291 100644
--- a/src/pathfinder/npf/aystar.cpp
+++ b/src/pathfinder/npf/aystar.cpp
@@ -170,7 +170,7 @@ int AyStar::Loop()
if (current == NULL) return AYSTAR_EMPTY_OPENLIST;
/* Check for end node and if found, return that code */
- if (this->EndNodeCheck(this, current) == AYSTAR_FOUND_END_NODE) {
+ if (this->EndNodeCheck(this, current) == AYSTAR_FOUND_END_NODE && !CheckIgnoreFirstTile(&current->path)) {
if (this->FoundEndNode != NULL) {
this->FoundEndNode(this, current);
}