From a077b7a92e87a3edd1cebb9bdd4c4fa3ec3d7bb7 Mon Sep 17 00:00:00 2001 From: vaxerski Date: Sat, 5 Aug 2023 23:29:33 +0200 Subject: animationmgr: avoid redundant ticks --- src/helpers/AnimatedVariable.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/helpers/AnimatedVariable.cpp') diff --git a/src/helpers/AnimatedVariable.cpp b/src/helpers/AnimatedVariable.cpp index 2961439d..450826f9 100644 --- a/src/helpers/AnimatedVariable.cpp +++ b/src/helpers/AnimatedVariable.cpp @@ -82,8 +82,11 @@ float CAnimatedVariable::getCurveValue() { } void CAnimatedVariable::connectToActive() { + g_pAnimationManager->scheduleTick(); // otherwise the animation manager will never pick this up + if (!m_bIsConnectedToActive) g_pAnimationManager->m_vActiveAnimatedVariables.push_back(this); + m_bIsConnectedToActive = true; } -- cgit v1.2.3