summaryrefslogtreecommitdiff
path: root/src/helpers/AnimatedVariable.cpp
diff options
context:
space:
mode:
authorVaxry <vaxry@vaxry.net>2024-02-27 22:34:02 +0000
committerVaxry <vaxry@vaxry.net>2024-02-27 22:34:07 +0000
commite2c286548d2a83376df3001bab0b48e529bd0075 (patch)
tree7148020cfb04fa40adc5830993db5257042aad46 /src/helpers/AnimatedVariable.cpp
parent60f81b8a23d3d18fc0e57ca56eadbce6facb27ee (diff)
avar: return curve value of 1 when not animated
fixes #4862
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 50de0149..740e604f 100644
--- a/src/helpers/AnimatedVariable.cpp
+++ b/src/helpers/AnimatedVariable.cpp
@@ -75,6 +75,9 @@ float CAnimatedVariable::getPercent() {
}
float CAnimatedVariable::getCurveValue() {
+ if (!m_bIsBeingAnimated)
+ return 1.f;
+
const auto SPENT = getPercent();
if (SPENT >= 1.f)