diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-03-10 15:58:38 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-03-10 15:58:38 +0300 |
commit | 3131f766339fa58875bce8257f6127136c217a30 (patch) | |
tree | 29a1b9ef11080607d47cd56e78499b83e9395071 /src | |
parent | 86219d497ba5c15813041945d3dd86f9a3a8f45c (diff) | |
download | plus-3131f766339fa58875bce8257f6127136c217a30.tar.gz plus-3131f766339fa58875bce8257f6127136c217a30.tar.bz2 plus-3131f766339fa58875bce8257f6127136c217a30.tar.xz plus-3131f766339fa58875bce8257f6127136c217a30.zip |
Add missing check.
Diffstat (limited to 'src')
-rw-r--r-- | src/being/being.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp index 0be04ac0b..cb276801a 100644 --- a/src/being/being.cpp +++ b/src/being/being.cpp @@ -1719,12 +1719,14 @@ 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)) + if (mMap) { - mReachable = Reachable::REACH_UNKNOWN; + mOldHeight = mMap->getHeightOffset(mX, mY); + if (mReachable == Reachable::REACH_NO && + mMap->getBlockMask(mX, mY) != mMap->getBlockMask(pos.x, pos.y)) + { + mReachable = Reachable::REACH_UNKNOWN; + } } } mX = pos.x; |