mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
[c][cpp] Ported fix for #1119
This commit is contained in:
parent
73fca0ba63
commit
2726229071
@ -325,6 +325,9 @@ int /*boolean*/ _spAnimationState_updateMixingFrom (spAnimationState* self, spTr
|
|||||||
|
|
||||||
finished = _spAnimationState_updateMixingFrom(self, from, delta);
|
finished = _spAnimationState_updateMixingFrom(self, from, delta);
|
||||||
|
|
||||||
|
from->animationLast = from->nextAnimationLast;
|
||||||
|
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 || to->timeScale == 0)) {
|
||||||
/* 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). */
|
||||||
@ -336,8 +339,6 @@ int /*boolean*/ _spAnimationState_updateMixingFrom (spAnimationState* self, spTr
|
|||||||
return finished;
|
return finished;
|
||||||
}
|
}
|
||||||
|
|
||||||
from->animationLast = from->nextAnimationLast;
|
|
||||||
from->trackLast = from->nextTrackLast;
|
|
||||||
from->trackTime += delta * from->timeScale;
|
from->trackTime += delta * from->timeScale;
|
||||||
to->mixTime += delta * to->timeScale;
|
to->mixTime += delta * to->timeScale;
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@ -756,6 +756,9 @@ bool AnimationState::updateMixingFrom(TrackEntry *to, float delta) {
|
|||||||
|
|
||||||
bool finished = updateMixingFrom(from, delta);
|
bool finished = updateMixingFrom(from, delta);
|
||||||
|
|
||||||
|
from->_animationLast = from->_nextAnimationLast;
|
||||||
|
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 || to->_timeScale == 0)) {
|
||||||
// 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).
|
||||||
@ -767,8 +770,6 @@ bool AnimationState::updateMixingFrom(TrackEntry *to, float delta) {
|
|||||||
return finished;
|
return finished;
|
||||||
}
|
}
|
||||||
|
|
||||||
from->_animationLast = from->_nextAnimationLast;
|
|
||||||
from->_trackLast = from->_nextTrackLast;
|
|
||||||
from->_trackTime += delta * from->_timeScale;
|
from->_trackTime += delta * from->_timeScale;
|
||||||
to->_mixTime += delta * to->_timeScale;
|
to->_mixTime += delta * to->_timeScale;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user