mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
Fix AnimationState to use previous.timeScale when mixing.
This commit is contained in:
parent
afe0817811
commit
55c98fc7f1
@ -87,17 +87,17 @@ void spAnimationState_dispose (spAnimationState* self) {
|
|||||||
|
|
||||||
void spAnimationState_update (spAnimationState* self, float delta) {
|
void spAnimationState_update (spAnimationState* self, float delta) {
|
||||||
int i;
|
int i;
|
||||||
float trackDelta;
|
float previousDelta;
|
||||||
delta *= self->timeScale;
|
delta *= self->timeScale;
|
||||||
for (i = 0; i < self->trackCount; i++) {
|
for (i = 0; i < self->trackCount; i++) {
|
||||||
spTrackEntry* current = self->tracks[i];
|
spTrackEntry* current = self->tracks[i];
|
||||||
if (!current) continue;
|
if (!current) continue;
|
||||||
|
|
||||||
trackDelta = delta * current->timeScale;
|
current->time += delta * current->timeScale;
|
||||||
current->time += trackDelta;
|
|
||||||
if (current->previous) {
|
if (current->previous) {
|
||||||
current->previous->time += trackDelta;
|
previousDelta = delta * current->previous->timeScale;
|
||||||
current->mixTime += trackDelta;
|
current->previous->time += previousDelta;
|
||||||
|
current->mixTime += previousDelta;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (current->next) {
|
if (current->next) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user