summaryrefslogtreecommitdiff
path: root/src/map.h
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2006-11-12 15:40:23 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2006-11-12 15:40:23 +0000
commit3262d5319c5f2cc830b3b783880df4b1b5d95710 (patch)
tree4573e5097a54d35ff6937bd001a06ffe3f9146ae /src/map.h
parent3eca8915fd14dcebe88647a198bfce5d789a6efb (diff)
downloadmana-client-3262d5319c5f2cc830b3b783880df4b1b5d95710.tar.gz
mana-client-3262d5319c5f2cc830b3b783880df4b1b5d95710.tar.bz2
mana-client-3262d5319c5f2cc830b3b783880df4b1b5d95710.tar.xz
mana-client-3262d5319c5f2cc830b3b783880df4b1b5d95710.zip
Made pathfinding algorithm cope better with beings blocking the road. This is
done by allowing walking over other beings, but at an additional cost so that it is preferable to walk around them.
Diffstat (limited to 'src/map.h')
-rw-r--r--src/map.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/map.h b/src/map.h
index 961326b8..15b9b0dc 100644
--- a/src/map.h
+++ b/src/map.h
@@ -129,7 +129,7 @@ class Map : public Properties
MetaTile *getMetaTile(int x, int y);
/**
- * Set walkability flag for a tile
+ * Set walkability flag for a tile.
*/
void setWalk(int x, int y, bool walkable);
@@ -199,6 +199,16 @@ class Map : public Properties
Tileset*
getTilesetWithGid(int gid);
+ /**
+ * Tells whether a tile is occupied by a being.
+ */
+ bool occupied(int x, int y);
+
+ /**
+ * Tells whether the given coordinates fall within the map boundaries.
+ */
+ bool contains(int x, int y);
+
int mWidth, mHeight;
int mTileWidth, mTileHeight;
MetaTile *mMetaTiles;