mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
[c] Ported 0 timeScale fix, see #1194.
This commit is contained in:
parent
0161fe59ca
commit
18258e9603
@ -327,7 +327,7 @@ int /*boolean*/ _spAnimationState_updateMixingFrom (spAnimationState* self, spTr
|
|||||||
from->trackLast = from->nextTrackLast;
|
from->trackLast = from->nextTrackLast;
|
||||||
|
|
||||||
/* Require mixTime > 0 to ensure the mixing from entry was applied at least once. */
|
/* Require mixTime > 0 to ensure the mixing from entry was applied at least once. */
|
||||||
if (to->mixTime > 0 && (to->mixTime >= to->mixDuration || to->timeScale == 0)) {
|
if (to->mixTime > 0 && to->mixTime >= to->mixDuration) {
|
||||||
/* Require totalAlpha == 0 to ensure mixing is complete, unless mixDuration == 0 (the transition is a single frame). */
|
/* Require totalAlpha == 0 to ensure mixing is complete, unless mixDuration == 0 (the transition is a single frame). */
|
||||||
if (from->totalAlpha == 0 || to->mixDuration == 0) {
|
if (from->totalAlpha == 0 || to->mixDuration == 0) {
|
||||||
to->mixingFrom = from->mixingFrom;
|
to->mixingFrom = from->mixingFrom;
|
||||||
@ -338,6 +338,12 @@ int /*boolean*/ _spAnimationState_updateMixingFrom (spAnimationState* self, spTr
|
|||||||
return finished;
|
return finished;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (to->timeScale == 0 && to->mixingTo) {
|
||||||
|
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 * to->timeScale;
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user