From c31d57561a06b4375f596e5c16bf67e99f2c53d7 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 3 Mar 2016 15:25:25 +0300 Subject: Fix targetting monsters what was first visible by player on unreachable tiles. --- src/being/being.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/being') diff --git a/src/being/being.cpp b/src/being/being.cpp index df52f7793..bfd9083a0 100644 --- a/src/being/being.cpp +++ b/src/being/being.cpp @@ -1714,7 +1714,15 @@ void Being::nextTile() restrict2 } if (mX != pos.x || mY != pos.y) + { mOldHeight = mMap->getHeightOffset(mX, mY); + if (mMap && + mReachable == Reachable::REACH_NO && + mMap->getBlockMask(mX, mY) != mMap->getBlockMask(pos.x, pos.y)) + { + mReachable = Reachable::REACH_UNKNOWN; + } + } mX = pos.x; mY = pos.y; const uint8_t height = mMap->getHeightOffset(mX, mY); -- cgit v1.2.3-70-g09d2