avar: fix warp onEnd conditions

ref #5348
This commit is contained in:
Vaxry 2024-03-31 21:34:11 +01:00
parent 4156b55cf9
commit 64c8ba2fb1

View file

@ -279,7 +279,7 @@ class CAnimatedVariable : public CBaseAnimatedVariable {
} }
void warp(bool endCallback = true) override { void warp(bool endCallback = true) override {
if (m_Value == m_Goal) if (!m_bIsBeingAnimated)
return; return;
m_Value = m_Goal; m_Value = m_Goal;
@ -289,8 +289,7 @@ class CAnimatedVariable : public CBaseAnimatedVariable {
if (m_fUpdateCallback) if (m_fUpdateCallback)
m_fUpdateCallback(this); m_fUpdateCallback(this);
if (endCallback) onAnimationEnd();
onAnimationEnd();
} }
private: private: