From 2977b025e2ac7b914eb8856c6554058fa02e77af Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 2 Mar 2016 00:15:21 +0300 Subject: Fix movement by diagonal near water or air collisions. --- src/resources/map/map.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src') 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; } -- cgit v1.2.3-70-g09d2