summaryrefslogtreecommitdiff
path: root/src/being
diff options
context:
space:
mode:
Diffstat (limited to 'src/being')
-rw-r--r--src/being/being.cpp12
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;