summaryrefslogtreecommitdiff
path: root/src/pathfinder/npf/aystar.cpp
diff options
context:
space:
mode:
authorJ0an Josep <juanjo.ng.83@gmail.com>2019-01-14 23:14:44 +0100
committerCharles Pigott <charlespigott@googlemail.com>2019-01-31 22:15:56 +0000
commitaa63517c92e34facde14b0dc97850499a3ad42d3 (patch)
tree44739599d7e3f6873206db9c5fab66dc7fa0ffc1 /src/pathfinder/npf/aystar.cpp
parent19be1f4ace00f784270218cdb4041f302d2198c9 (diff)
downloadopenttd-aa63517c92e34facde14b0dc97850499a3ad42d3.tar.xz
Fix #7060: [NPF] Do not check whether ignored first tiles are end nodes.
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);
}