summaryrefslogtreecommitdiff
path: root/src/helpers/AnimatedVariable.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/helpers/AnimatedVariable.cpp')
-rw-r--r--src/helpers/AnimatedVariable.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/helpers/AnimatedVariable.cpp b/src/helpers/AnimatedVariable.cpp
index c4a1713d..77707349 100644
--- a/src/helpers/AnimatedVariable.cpp
+++ b/src/helpers/AnimatedVariable.cpp
@@ -54,10 +54,13 @@ CAnimatedVariable::~CAnimatedVariable() {
void CAnimatedVariable::unregister() {
g_pAnimationManager->m_lAnimatedVariables.remove(this);
+ m_bIsRegistered = false;
}
void CAnimatedVariable::registerVar() {
- g_pAnimationManager->m_lAnimatedVariables.push_back(this);
+ if (!m_bIsRegistered)
+ g_pAnimationManager->m_lAnimatedVariables.push_back(this);
+ m_bIsRegistered = true;
}
int CAnimatedVariable::getDurationLeftMs() {