summaryrefslogtreecommitdiff
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
parent1694c27097eccab525f8bbe03ff050a0315a1c4f (diff)
downloadmv-c31d57561a06b4375f596e5c16bf67e99f2c53d7.tar.gz
mv-c31d57561a06b4375f596e5c16bf67e99f2c53d7.tar.bz2
mv-c31d57561a06b4375f596e5c16bf67e99f2c53d7.tar.xz
mv-c31d57561a06b4375f596e5c16bf67e99f2c53d7.zip
Fix targetting monsters what was first visible by player on unreachable tiles.
-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);