diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-03-03 15:25:25 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-03-03 15:25:25 +0300 |
commit | c31d57561a06b4375f596e5c16bf67e99f2c53d7 (patch) | |
tree | f50ef10961322d6df6ad1fdc8c8c8bac8f631b6f /src/being/being.cpp | |
parent | 1694c27097eccab525f8bbe03ff050a0315a1c4f (diff) | |
download | manaverse-c31d57561a06b4375f596e5c16bf67e99f2c53d7.tar.gz manaverse-c31d57561a06b4375f596e5c16bf67e99f2c53d7.tar.bz2 manaverse-c31d57561a06b4375f596e5c16bf67e99f2c53d7.tar.xz manaverse-c31d57561a06b4375f596e5c16bf67e99f2c53d7.zip |
Fix targetting monsters what was first visible by player on unreachable tiles.
Diffstat (limited to 'src/being/being.cpp')
-rw-r--r-- | src/being/being.cpp | 8 |
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); |