From f40c9b8012191d72b1a738c1161b0c82b8387fed Mon Sep 17 00:00:00 2001 From: Philipp Sehmisch Date: Mon, 12 Mar 2007 16:45:25 +0000 Subject: Fixed some wrong comments and made the timing more accurate for simple animations with frames that change faster than they are updated. --- src/simpleanimation.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/simpleanimation.cpp') 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()) { -- cgit v1.2.3-70-g09d2