From 727cdde392eb7d2e892f8a308ab0d16b70947070 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sat, 8 Jun 2019 10:16:48 +0300 Subject: [PATCH] Do not scale looping animation duration --- source/animate.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); } -- 2.43.0