From 6dfce16c4bea60b936a0f1efccf4d11db2ba0e49 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 27 Jul 2014 22:06:59 +0300 Subject: Fix being position if state is not moving but being still not in destination. --- src/being/being.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/being/being.cpp b/src/being/being.cpp index 1523c10a0..2bfaf02b7 100644 --- a/src/being/being.cpp +++ b/src/being/being.cpp @@ -1427,13 +1427,18 @@ void Being::logic() if (mAction == BeingAction::MOVE || mNeedPosUpdate) { - mNeedPosUpdate = false; const int xOffset = getXOffset(); const int yOffset = getYOffset(); int offset = xOffset; if (!offset) offset = yOffset; + if (!xOffset && !yOffset) + { + mNeedPosUpdate = false; + logger->log("reset"); + } + mSortOffsetY = (mOldHeight * mapTileSize / 2) + (mOffsetY * mapTileSize / 2) * (mapTileSize - abs(offset)) / mapTileSize; -- cgit v1.2.3-70-g09d2