summaryrefslogtreecommitdiffstats
path: root/src/runtime/animator/q3dsanimator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/animator/q3dsanimator.cpp')
-rw-r--r--src/runtime/animator/q3dsanimator.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/runtime/animator/q3dsanimator.cpp b/src/runtime/animator/q3dsanimator.cpp
index 3f0265e..eb9db08 100644
--- a/src/runtime/animator/q3dsanimator.cpp
+++ b/src/runtime/animator/q3dsanimator.cpp
@@ -187,10 +187,11 @@ void Q3DSAnimator::advance(float dt)
bool eos = false;
bool resetLocalTime = false;
- // 1. If localTime is > 0.0f and newTime == 0.0f => EOS
- // 2. If localTime is < duration and newTime == duration => EOS
+ // 1. +rate && newTime == duration => EOS
+ // 2. -rate && newTime == 0.0f => EOS
+ // 3. !rate => no-op
// Note that we only notify aboud EOS when we're not looping/pingponging.
- if ((localTime > 0.0f && qFuzzyCompare(newTime, 0.0f)) || (localTime < duration && qFuzzyCompare(newTime, duration))) {
+ if (((rate > 0.0f) && qFuzzyCompare(newTime, duration)) || ((rate < 0.0f) && qFuzzyCompare(newTime, 0.0f))) {
switch (playMode) {
case PlayMode::PlayThroughTo:
// We don't handle slide changes here, as that's a foreign concept,