summaryrefslogtreecommitdiff
path: root/aystar.h
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2005-04-02 10:38:31 +0000
committertruelight <truelight@openttd.org>2005-04-02 10:38:31 +0000
commit5a527daac951515c53a94ea4fb26d5b737dc264d (patch)
tree2bb637e0ebf36abd8b06639bf93ba4a0c7ad16e3 /aystar.h
parent1d0e0b22e439d95aebf370197e52a02c273db47f (diff)
downloadopenttd-5a527daac951515c53a94ea4fb26d5b737dc264d.tar.xz
(svn r2121) -Fix: changed the 2nd param of AyStar_EndNodeCheck back to what it should be
Diffstat (limited to 'aystar.h')
-rw-r--r--aystar.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/aystar.h b/aystar.h
index dab6b81e8..f1720a594 100644
--- a/aystar.h
+++ b/aystar.h
@@ -56,7 +56,15 @@ typedef struct AyStar AyStar;
* AYSTAR_FOUND_END_NODE : indicates this is the end tile
* AYSTAR_DONE : indicates this is not the end tile (or direction was wrong)
*/
-typedef int32 AyStar_EndNodeCheck(AyStar *aystar, AyStarNode *node);
+/*
+ * The 2nd parameter should be OpenListNode, and NOT AyStarNode. AyStarNode is
+ * part of OpenListNode and so it could be accessed without any problems.
+ * The good part about OpenListNode is, and how AIs use it, that you can
+ * access the parent of the current node, and so check if you, for example
+ * don't try to enter the file tile with a 90-degree curve. So please, leave
+ * this an OpenListNode, it works just fine -- TrueLight
+ */
+typedef int32 AyStar_EndNodeCheck(AyStar *aystar, OpenListNode *current);
/*
* This function is called to calculate the G-value for AyStar Algorithm.