summaryrefslogtreecommitdiff
path: root/src/map.cpp
diff options
context:
space:
mode:
authorYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2011-03-10 18:30:44 +0100
committerYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2011-03-10 18:30:44 +0100
commit25a2abd09e3b76115ed0b6b1a02cdddc6c1c5bfc (patch)
treefe336967171fc706673fa6b5c8dd5bc2c905f85d /src/map.cpp
parenta7d52dd2d59049e9bf097694c8e708bc1ad6fec2 (diff)
downloadMana-25a2abd09e3b76115ed0b6b1a02cdddc6c1c5bfc.tar.gz
Mana-25a2abd09e3b76115ed0b6b1a02cdddc6c1c5bfc.tar.bz2
Mana-25a2abd09e3b76115ed0b6b1a02cdddc6c1c5bfc.tar.xz
Mana-25a2abd09e3b76115ed0b6b1a02cdddc6c1c5bfc.zip
Fix the pathfinding method to acccept every walkmasks.
Previously, the walkmask was hardcoded to handling walls. Trivial.
Diffstat (limited to 'src/map.cpp')
-rw-r--r--src/map.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/map.cpp b/src/map.cpp
index de6cf12a..87c902f6 100644
--- a/src/map.cpp
+++ b/src/map.cpp
@@ -831,7 +831,7 @@ Path Map::findPath(int startX, int startY, int destX, int destY,
MetaTile *t1 = getMetaTile(curr.x, curr.y + dy);
MetaTile *t2 = getMetaTile(curr.x + dx, curr.y);
- if ((t1->blockmask | t2->blockmask) & BLOCKMASK_WALL)
+ if ((t1->blockmask | t2->blockmask) & walkmask)
continue;
}