mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +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) {
|
if (last->loop) {
|
||||||
delay += duration * (1 + (int) (last->trackTime / duration));
|
delay += duration * (1 + (int) (last->trackTime / duration));
|
||||||
} else {
|
} else {
|
||||||
delay += duration;
|
delay += MAX(duration, last->trackTime);
|
||||||
}
|
}
|
||||||
delay -= spAnimationStateData_getMix(self->data, last->animation, animation);
|
delay -= spAnimationStateData_getMix(self->data, last->animation, animation);
|
||||||
} else
|
} else
|
||||||
delay = 0;
|
delay = last->trackTime;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -582,11 +582,11 @@ TrackEntry *AnimationState::addAnimation(int trackIndex, Animation *animation, b
|
|||||||
if (last->_loop) {
|
if (last->_loop) {
|
||||||
delay += duration * (1 + (int) (last->_trackTime / duration));
|
delay += duration * (1 + (int) (last->_trackTime / duration));
|
||||||
} else {
|
} else {
|
||||||
delay += duration;
|
delay += MathUtil::max(duration, last->_trackTime);
|
||||||
}
|
}
|
||||||
delay -= _data->getMix(last->_animation, animation);
|
delay -= _data->getMix(last->_animation, animation);
|
||||||
} else {
|
} else {
|
||||||
delay = 0;
|
delay = last->_trackTime;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user