summaryrefslogtreecommitdiff
path: root/src/being
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-03-03 15:25:25 +0300
committerAndrei Karas <akaras@inbox.ru>2016-03-03 15:25:25 +0300
commitc31d57561a06b4375f596e5c16bf67e99f2c53d7 (patch)
treef50ef10961322d6df6ad1fdc8c8c8bac8f631b6f /src/being
parent1694c27097eccab525f8bbe03ff050a0315a1c4f (diff)
downloadplus-c31d57561a06b4375f596e5c16bf67e99f2c53d7.tar.gz
plus-c31d57561a06b4375f596e5c16bf67e99f2c53d7.tar.bz2
plus-c31d57561a06b4375f596e5c16bf67e99f2c53d7.tar.xz
plus-c31d57561a06b4375f596e5c16bf67e99f2c53d7.zip
Fix targetting monsters what was first visible by player on unreachable tiles.
Diffstat (limited to 'src/being')
-rw-r--r--src/being/being.cpp8
1 files changed, 8 insertions, 0 deletions
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);