From: Mikko Rasa Date: Sat, 8 Jun 2019 07:16:48 +0000 (+0300) Subject: Do not scale looping animation duration X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=727cdde392eb7d2e892f8a308ab0d16b70947070;p=libs%2Fdemoscene.git Do not scale looping animation duration --- diff --git a/source/animate.cpp b/source/animate.cpp index f30281d..2812915 100644 --- a/source/animate.cpp +++ b/source/animate.cpp @@ -30,7 +30,9 @@ void Animate::validate() const void Animate::start(float, float d) { - float speed = (d ? (anim->get_duration()/Time::sec)/d : 1.0f); + float speed = 1.0f; + if(!anim->is_looping() && d) + speed = (anim->get_duration()/Time::sec)/d; player->play(*target, *anim, speed); }