diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/simpleanimation.cpp | 4 | ||||
-rw-r--r-- | src/simpleanimation.h | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/simpleanimation.cpp b/src/simpleanimation.cpp index 5baf8fc9..a0aedc06 100644 --- a/src/simpleanimation.cpp +++ b/src/simpleanimation.cpp @@ -29,9 +29,9 @@ void SimpleAnimation::update(unsigned int timePassed) { mAnimationTime+=timePassed; - if (mAnimationTime > mCurrentFrame->delay) + while (mAnimationTime > mCurrentFrame->delay) { - mAnimationTime = 0; + mAnimationTime -= mCurrentFrame->delay; mAnimationPhase++; if (mAnimationPhase >= mAnimation->getLength()) { diff --git a/src/simpleanimation.h b/src/simpleanimation.h index 084211ea..3eb51c7e 100644 --- a/src/simpleanimation.h +++ b/src/simpleanimation.h @@ -52,8 +52,8 @@ class SimpleAnimation private: Animation *mAnimation; /**< The hosted animation */ unsigned int mAnimationTime; /**< Time in game ticks the current frame is shown*/ - unsigned int mAnimationPhase; /**< Current animation phase when the appearance is ANIMATION*/ - Frame *mCurrentFrame; + unsigned int mAnimationPhase; /**< Index of current animation phase*/ + Frame *mCurrentFrame; /**< Current animation phase */ }; #endif |