mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-14 19:11:36 +08:00
[c][cpp] Port fix to AnimationState, see #1092
This commit is contained in:
parent
4981aa69b9
commit
9651e0bc53
@ -733,11 +733,11 @@ spTrackEntry* spAnimationState_addAnimation (spAnimationState* self, int trackIn
|
||||
if (last->loop) {
|
||||
delay += duration * (1 + (int) (last->trackTime / duration));
|
||||
} else {
|
||||
delay += duration;
|
||||
delay += MAX(duration, last->trackTime);
|
||||
}
|
||||
delay -= spAnimationStateData_getMix(self->data, last->animation, animation);
|
||||
} else
|
||||
delay = 0;
|
||||
delay = last->trackTime;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -582,11 +582,11 @@ TrackEntry *AnimationState::addAnimation(int trackIndex, Animation *animation, b
|
||||
if (last->_loop) {
|
||||
delay += duration * (1 + (int) (last->_trackTime / duration));
|
||||
} else {
|
||||
delay += duration;
|
||||
delay += MathUtil::max(duration, last->_trackTime);
|
||||
}
|
||||
delay -= _data->getMix(last->_animation, animation);
|
||||
} else {
|
||||
delay = 0;
|
||||
delay = last->_trackTime;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user