From 9e8f0518961041b60e6c4843f545734e833d5355 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Sun, 31 Mar 2024 21:43:08 +0100 Subject: [PATCH] avar: minor fixes --- src/helpers/AnimatedVariable.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/helpers/AnimatedVariable.hpp b/src/helpers/AnimatedVariable.hpp index 2add41be..85ffb9ab 100644 --- a/src/helpers/AnimatedVariable.hpp +++ b/src/helpers/AnimatedVariable.hpp @@ -274,7 +274,8 @@ class CAnimatedVariable : public CBaseAnimatedVariable { // Sets the actual value and goal void setValueAndWarp(const VarType& v) { - m_Goal = v; + m_Goal = v; + m_bIsBeingAnimated = true; warp(); } @@ -289,7 +290,8 @@ class CAnimatedVariable : public CBaseAnimatedVariable { if (m_fUpdateCallback) m_fUpdateCallback(this); - onAnimationEnd(); + if (endCallback) + onAnimationEnd(); } private: