summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKUDr <KUDr@openttd.org>2006-06-04 00:28:24 +0000
committerKUDr <KUDr@openttd.org>2006-06-04 00:28:24 +0000
commit42c7bc650729bcfd07a4206993cd5acce1aaa3ee (patch)
treee73b24764777b03362f38f2cb8ff6067512244d6
parent40197e244c8c9a042abe8d9254cf3160175d933a (diff)
downloadopenttd-42c7bc650729bcfd07a4206993cd5acce1aaa3ee.tar.xz
(svn r5090) -Fix: [NPF] broken by me - r4366 (thanks Tron)
-rw-r--r--aystar.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/aystar.c b/aystar.c
index 229da27b1..c34c28ce2 100644
--- a/aystar.c
+++ b/aystar.c
@@ -149,7 +149,8 @@ int AyStarMain_Loop(AyStar *aystar) {
// Get the best node from OpenList
OpenListNode *current = AyStarMain_OpenList_Pop(aystar);
// If empty, drop an error
- if (current == NULL) return AYSTAR_EMPTY_OPENLIST;
+ if (current == NULL)
+ return AYSTAR_EMPTY_OPENLIST;
// Check for end node and if found, return that code
if (aystar->EndNodeCheck(aystar, current) == AYSTAR_FOUND_END_NODE) {
@@ -236,11 +237,12 @@ int AyStarMain_Main(AyStar *aystar) {
else if (r == AYSTAR_LIMIT_REACHED)
printf("[AyStar] Exceeded search_nodes, no path found\n");
#endif
- if (r != AYSTAR_STILL_BUSY)
+ if (r != AYSTAR_STILL_BUSY) {
/* We're done, clean up */
_aystar_stats_open_size = aystar->OpenListHash.size;
_aystar_stats_closed_size = aystar->ClosedListHash.size;
aystar->clear(aystar);
+ }
// Check result-value
if (r == AYSTAR_FOUND_END_NODE) return AYSTAR_FOUND_END_NODE;