mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-04 22:34:53 +08:00
[c][cpp] Fix for #1290, do not carry over time when timeScale of a track entry taht's being replaced by a new one is 0.
This commit is contained in:
parent
57e38a0cb3
commit
ed5dee43ef
@ -280,7 +280,7 @@ void spAnimationState_update (spAnimationState* self, float delta) {
|
||||
float nextTime = current->trackLast - next->delay;
|
||||
if (nextTime >= 0) {
|
||||
next->delay = 0;
|
||||
next->trackTime = (nextTime / current->timeScale + delta) * next->timeScale;
|
||||
next->trackTime = current->timeScale == 0 ? 0 : (nextTime / current->timeScale + delta) * next->timeScale;
|
||||
current->trackTime += currentDelta;
|
||||
_spAnimationState_setCurrent(self, i, next, 1);
|
||||
while (next->mixingFrom) {
|
||||
|
||||
@ -334,7 +334,7 @@ void AnimationState::update(float delta) {
|
||||
float nextTime = current._trackLast - next->_delay;
|
||||
if (nextTime >= 0) {
|
||||
next->_delay = 0;
|
||||
next->_trackTime = (nextTime / current._timeScale + delta) * next->_timeScale;
|
||||
next->_trackTime = current._timeScale == 0 ? 0 : (nextTime / current._timeScale + delta) * next->_timeScale;
|
||||
current._trackTime += currentDelta;
|
||||
setCurrent(i, next, true);
|
||||
while (next->_mixingFrom != NULL) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user