summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-03-02 00:15:21 +0300
committerAndrei Karas <akaras@inbox.ru>2016-03-02 00:15:21 +0300
commit2977b025e2ac7b914eb8856c6554058fa02e77af (patch)
tree4a2090330e1e9019c3fa7807af67455f0635f8d4
parent163c2b925053dadf7b431b6fc9f208d51f1dde4e (diff)
downloadplus-2977b025e2ac7b914eb8856c6554058fa02e77af.tar.gz
plus-2977b025e2ac7b914eb8856c6554058fa02e77af.tar.bz2
plus-2977b025e2ac7b914eb8856c6554058fa02e77af.tar.xz
plus-2977b025e2ac7b914eb8856c6554058fa02e77af.zip
Fix movement by diagonal near water or air collisions.
-rw-r--r--src/resources/map/map.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/resources/map/map.cpp b/src/resources/map/map.cpp
index 39dc4b28f..b2697ddcf 100644
--- a/src/resources/map/map.cpp
+++ b/src/resources/map/map.cpp
@@ -915,7 +915,9 @@ Path Map::findPath(const int startX, const int startY,
// Skip if the tile is on the closed list or is not walkable
// unless its the destination tile
- // +++ here need check block must depend on player abilities.
+ // +++ probably here "newTile->blockmask & BlockMask::WALL"
+ // can be removed. It left here only for protect from
+ // walk on wall in any case
if (newTile->whichList == mOnClosedList ||
((newTile->blockmask & blockWalkMask)
&& !(x == destX && y == destY))
@@ -933,9 +935,8 @@ Path Map::findPath(const int startX, const int startY,
const MetaTile *const t2 = &mMetaTiles[curr.x +
dx + curWidth];
- // +++ here need check block must depend
// on player abilities.
- if (((t1->blockmask | t2->blockmask) & BlockMask::WALL))
+ if (((t1->blockmask | t2->blockmask) & blockWalkMask))
continue;
}