diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-03-20 01:48:55 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-03-20 01:48:55 +0300 |
commit | 66d5da1cb7e1551ac019a08075896ba04b172e36 (patch) | |
tree | 4e574c152b7094ee10ce91c25ce2a1750d6abda2 /src/simpleanimation.cpp | |
parent | d8505394ee7e109c3fd1d35450ed106a5ceefcfb (diff) | |
download | manaverse-66d5da1cb7e1551ac019a08075896ba04b172e36.tar.gz manaverse-66d5da1cb7e1551ac019a08075896ba04b172e36.tar.bz2 manaverse-66d5da1cb7e1551ac019a08075896ba04b172e36.tar.xz manaverse-66d5da1cb7e1551ac019a08075896ba04b172e36.zip |
Fix tiles animation in opengl mode in non fringe layers.
Diffstat (limited to 'src/simpleanimation.cpp')
-rw-r--r-- | src/simpleanimation.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/simpleanimation.cpp b/src/simpleanimation.cpp index 2b7cc328d..89431a916 100644 --- a/src/simpleanimation.cpp +++ b/src/simpleanimation.cpp @@ -93,11 +93,12 @@ void SimpleAnimation::setFrame(int frame) mCurrentFrame = mAnimation->getFrame(mAnimationPhase); } -void SimpleAnimation::update(int timePassed) +bool SimpleAnimation::update(int timePassed) { if (!mCurrentFrame || !mAnimation) - return; + return false; + bool updated(false); if (mInitialized && mAnimation) { mAnimationTime += timePassed; @@ -105,6 +106,7 @@ void SimpleAnimation::update(int timePassed) while (mAnimationTime > mCurrentFrame->delay && mCurrentFrame->delay > 0) { + updated = true; mAnimationTime -= mCurrentFrame->delay; mAnimationPhase++; @@ -117,7 +119,7 @@ void SimpleAnimation::update(int timePassed) mCurrentFrame = mAnimation->getFrame(mAnimationPhase); } } - + return updated; } int SimpleAnimation::getLength() const |