mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-06 07:14:55 +08:00
Fixes completion event firing for 0 duration animations. See #1112.
This commit is contained in:
parent
0d2ca5a62b
commit
99ca67ca77
@ -386,10 +386,12 @@ public class AnimationState {
|
||||
}
|
||||
|
||||
// Queue complete if completed a loop iteration or the animation.
|
||||
if (entry.loop ? (trackLastWrapped > entry.trackTime % duration)
|
||||
: (animationTime >= animationEnd && entry.animationLast < animationEnd)) {
|
||||
queue.complete(entry);
|
||||
}
|
||||
boolean complete;
|
||||
if (entry.loop)
|
||||
complete = duration == 0 || trackLastWrapped > entry.trackTime % duration;
|
||||
else
|
||||
complete = animationTime >= animationEnd && entry.animationLast < animationEnd;
|
||||
if (complete) queue.complete(entry);
|
||||
|
||||
// Queue events after complete.
|
||||
for (; i < n; i++) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user