mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
[as3] Ported new fix for 0 timeScale not returning to setup pose. See #1194.
This commit is contained in:
parent
d71d5a390e
commit
545ac276a0
Binary file not shown.
@ -90,11 +90,11 @@ package spine.animation {
|
|||||||
var nextTime : Number = current.trackLast - next.delay;
|
var nextTime : Number = current.trackLast - next.delay;
|
||||||
if (nextTime >= 0) {
|
if (nextTime >= 0) {
|
||||||
next.delay = 0;
|
next.delay = 0;
|
||||||
next.trackTime = nextTime + delta * next.timeScale;
|
next.trackTime = (nextTime / current.timeScale + delta) * next.timeScale;
|
||||||
current.trackTime += currentDelta;
|
current.trackTime += currentDelta;
|
||||||
setCurrent(i, next, true);
|
setCurrent(i, next, true);
|
||||||
while (next.mixingFrom != null) {
|
while (next.mixingFrom != null) {
|
||||||
next.mixTime += currentDelta;
|
next.mixTime += delta;
|
||||||
next = next.mixingFrom;
|
next = next.mixingFrom;
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
@ -145,16 +145,9 @@ package spine.animation {
|
|||||||
}
|
}
|
||||||
return finished;
|
return finished;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If to has 0 timeScale and is not the first entry, remove the mix and apply it one more time to return to the setup pose.
|
|
||||||
if (to.timeScale == 0 && to.mixingTo != null) {
|
|
||||||
to.timeScale = 1;
|
|
||||||
to.mixTime = 0;
|
|
||||||
to.mixDuration = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
from.trackTime += delta * from.timeScale;
|
from.trackTime += delta * from.timeScale;
|
||||||
to.mixTime += delta * to.timeScale;
|
to.mixTime += delta;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user