From 7ce5864a81be7a51417152ed20369df92b5cc151 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Fri, 24 Dec 2021 22:46:43 +0100 Subject: [PATCH] fixed animation timing and clipping, your speed might be changed a bit --- src/utilities/AnimationUtil.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/utilities/AnimationUtil.cpp b/src/utilities/AnimationUtil.cpp index 96dd2c2..05b6f32 100644 --- a/src/utilities/AnimationUtil.cpp +++ b/src/utilities/AnimationUtil.cpp @@ -7,8 +7,7 @@ void AnimationUtil::move() { const double DELTA = std::chrono::duration_cast(std::chrono::high_resolution_clock::now() - lastFrame).count(); lastFrame = std::chrono::high_resolution_clock::now(); - const double ANIMATIONSPEED = ((double)1 / (double)ConfigManager::getFloat("anim:speed")) * DELTA; - + const double ANIMATIONSPEED = std::max(1.f / ((double)ConfigManager::getFloat("anim:speed") * DELTA) * 462.f, (double)1.f); bool updateRequired = false; // Now we are (or should be, lul) thread-safe.