summaryrefslogtreecommitdiff
path: root/src/map/path.h
diff options
context:
space:
mode:
authorPiotr HaƂaczkiewicz <piotr.halaczkiewicz@gmail.com>2013-07-23 09:56:54 +0200
committerPiotr HaƂaczkiewicz <piotr.halaczkiewicz@gmail.com>2013-07-23 18:04:17 +0200
commit78028c8b652a4edf761b6f250c2fca4b6c576dee (patch)
treecfe66856a33bfe12f9ce9dbfee16ab18128364e5 /src/map/path.h
parent056c181e1c163b7d49c87bc07bf82ef11fdbd539 (diff)
downloadhercules-78028c8b652a4edf761b6f250c2fca4b6c576dee.tar.gz
hercules-78028c8b652a4edf761b6f250c2fca4b6c576dee.tar.bz2
hercules-78028c8b652a4edf761b6f250c2fca4b6c576dee.tar.xz
hercules-78028c8b652a4edf761b6f250c2fca4b6c576dee.zip
Pathfinding code cleanup.
Now uses binary heap defined in `db.h`. Walk requests now use A* (hard) pathfinding only to match game client behavior. Added defines for movement cost. Added some documentation & comments.
Diffstat (limited to 'src/map/path.h')
-rw-r--r--src/map/path.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/map/path.h b/src/map/path.h
index b1ca71955..5bc551dc9 100644
--- a/src/map/path.h
+++ b/src/map/path.h
@@ -6,6 +6,9 @@
#include "map.h" // enum cell_chk
+#define MOVE_COST 10
+#define MOVE_DIAGONAL_COST 14
+
#define MAX_WALKPATH 32
struct walkpath_data {