summaryrefslogtreecommitdiff
path: root/src/simpleanimation.cpp
diff options
context:
space:
mode:
authorPhilipp Sehmisch <tmw@crushnet.org>2007-03-12 16:45:25 +0000
committerPhilipp Sehmisch <tmw@crushnet.org>2007-03-12 16:45:25 +0000
commitf40c9b8012191d72b1a738c1161b0c82b8387fed (patch)
treeb987ff6896a20911835c9675d2263c6cf93a2b3c /src/simpleanimation.cpp
parentda1ea1f3b7edaf4642c32457a722563ca37083e7 (diff)
downloadmana-f40c9b8012191d72b1a738c1161b0c82b8387fed.tar.gz
mana-f40c9b8012191d72b1a738c1161b0c82b8387fed.tar.bz2
mana-f40c9b8012191d72b1a738c1161b0c82b8387fed.tar.xz
mana-f40c9b8012191d72b1a738c1161b0c82b8387fed.zip
Fixed some wrong comments and made the timing more accurate for simple animations with frames that change faster than they are updated.
Diffstat (limited to 'src/simpleanimation.cpp')
-rw-r--r--src/simpleanimation.cpp4
1 files changed, 2 insertions, 2 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())
{