summaryrefslogtreecommitdiff
path: root/src/helpers/AnimatedVariable.cpp
diff options
context:
space:
mode:
authorvaxerski <vaxry@vaxry.net>2023-08-05 23:29:33 +0200
committervaxerski <vaxry@vaxry.net>2023-08-05 23:29:33 +0200
commita077b7a92e87a3edd1cebb9bdd4c4fa3ec3d7bb7 (patch)
tree50ad00b5bf146872926fa6e67f791096670fd0d9 /src/helpers/AnimatedVariable.cpp
parentb925f1b49774b38ab670815e78726fe16295d0d9 (diff)
animationmgr: avoid redundant ticks
Diffstat (limited to 'src/helpers/AnimatedVariable.cpp')
-rw-r--r--src/helpers/AnimatedVariable.cpp3
1 files changed, 3 insertions, 0 deletions
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;
}