summaryrefslogtreecommitdiff
path: root/src/being
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-01-28 00:00:26 +0300
committerAndrei Karas <akaras@inbox.ru>2017-01-28 00:00:26 +0300
commit81517373aa2eed68fc9901c7c71f22a18040cd51 (patch)
tree44228d7cf59a07cc209c607b1492c3dd305e9d43 /src/being
parentec0216cdd13aa89aba5da22bad3ef723fa27f6fb (diff)
downloadmv-81517373aa2eed68fc9901c7c71f22a18040cd51.tar.gz
mv-81517373aa2eed68fc9901c7c71f22a18040cd51.tar.bz2
mv-81517373aa2eed68fc9901c7c71f22a18040cd51.tar.xz
mv-81517373aa2eed68fc9901c7c71f22a18040cd51.zip
Fix code style. Remove some useless checks.
Diffstat (limited to 'src/being')
-rw-r--r--src/being/being.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp
index 911951789..817fcca70 100644
--- a/src/being/being.cpp
+++ b/src/being/being.cpp
@@ -1739,14 +1739,11 @@ void Being::nextTile() restrict2
if (mX != pos.x || mY != pos.y)
{
- if (mMap)
+ mOldHeight = mMap->getHeightOffset(mX, mY);
+ if (mReachable == Reachable::REACH_NO &&
+ mMap->getBlockMask(mX, mY) != mMap->getBlockMask(pos.x, pos.y))
{
- mOldHeight = mMap->getHeightOffset(mX, mY);
- if (mReachable == Reachable::REACH_NO &&
- mMap->getBlockMask(mX, mY) != mMap->getBlockMask(pos.x, pos.y))
- {
- mReachable = Reachable::REACH_UNKNOWN;
- }
+ mReachable = Reachable::REACH_UNKNOWN;
}
}
mX = pos.x;