animation: don't fire update events if the avar is not being animated

This commit is contained in:
Vaxry 2025-01-10 16:44:32 +01:00
parent 3c895da64b
commit 5dd4f4a9f7

View file

@ -103,7 +103,7 @@ bool CBaseAnimatedVariable::ok() const {
}
void CBaseAnimatedVariable::onUpdate() {
if (m_fUpdateCallback)
if (m_bIsBeingAnimated && m_fUpdateCallback)
m_fUpdateCallback(m_pSelf);
}