diff options
author | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2011-03-10 18:30:44 +0100 |
---|---|---|
committer | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2011-03-10 18:30:44 +0100 |
commit | 25a2abd09e3b76115ed0b6b1a02cdddc6c1c5bfc (patch) | |
tree | fe336967171fc706673fa6b5c8dd5bc2c905f85d /src/map.cpp | |
parent | a7d52dd2d59049e9bf097694c8e708bc1ad6fec2 (diff) | |
download | mana-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.cpp | 2 |
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; } |