From 3131f766339fa58875bce8257f6127136c217a30 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 10 Mar 2016 15:58:38 +0300 Subject: Add missing check. --- src/being/being.cpp | 12 +++++++----- 1 file 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; -- cgit v1.2.3-70-g09d2