avar: return curve value of 1 when not animated

fixes #4862
This commit is contained in:
Vaxry 2024-02-27 22:34:02 +00:00
parent 60f81b8a23
commit e2c286548d

View file

@ -75,6 +75,9 @@ float CAnimatedVariable::getPercent() {
} }
float CAnimatedVariable::getCurveValue() { float CAnimatedVariable::getCurveValue() {
if (!m_bIsBeingAnimated)
return 1.f;
const auto SPENT = getPercent(); const auto SPENT = getPercent();
if (SPENT >= 1.f) if (SPENT >= 1.f)