summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-07-27 22:06:59 +0300
committerAndrei Karas <akaras@inbox.ru>2014-07-27 22:06:59 +0300
commit6dfce16c4bea60b936a0f1efccf4d11db2ba0e49 (patch)
tree37e5d41fff10983dafcbcaa21fb7f6962f0fc47b /src
parent7f7625e913fd1d131feef4f816c90c33e79316d1 (diff)
downloadplus-6dfce16c4bea60b936a0f1efccf4d11db2ba0e49.tar.gz
plus-6dfce16c4bea60b936a0f1efccf4d11db2ba0e49.tar.bz2
plus-6dfce16c4bea60b936a0f1efccf4d11db2ba0e49.tar.xz
plus-6dfce16c4bea60b936a0f1efccf4d11db2ba0e49.zip
Fix being position if state is not moving but being still not in destination.
Diffstat (limited to 'src')
-rw-r--r--src/being/being.cpp7
1 files changed, 6 insertions, 1 deletions
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;