From 64c8ba2fb1977a055b9718c7c7cfb1740756d963 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Sun, 31 Mar 2024 21:34:11 +0100 Subject: [PATCH] avar: fix warp onEnd conditions ref #5348 --- src/helpers/AnimatedVariable.hpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/helpers/AnimatedVariable.hpp b/src/helpers/AnimatedVariable.hpp index 82e30892..2add41be 100644 --- a/src/helpers/AnimatedVariable.hpp +++ b/src/helpers/AnimatedVariable.hpp @@ -279,7 +279,7 @@ class CAnimatedVariable : public CBaseAnimatedVariable { } void warp(bool endCallback = true) override { - if (m_Value == m_Goal) + if (!m_bIsBeingAnimated) return; m_Value = m_Goal; @@ -289,8 +289,7 @@ class CAnimatedVariable : public CBaseAnimatedVariable { if (m_fUpdateCallback) m_fUpdateCallback(this); - if (endCallback) - onAnimationEnd(); + onAnimationEnd(); } private: