Porting over recent change from AnimationState.c to AnimationState.cpp

This commit is contained in:
Stephen Gowen 2018-01-16 09:50:31 -05:00
parent 2bf0d3fdfa
commit 162cbeec72

View File

@ -568,9 +568,13 @@ namespace Spine {
if (delay <= 0) {
float duration = last->_animationEnd - last->_animationStart;
if (duration != 0) {
delay += duration * (1 + (int)(last->_trackTime / duration)) - _data.getMix(last->_animation, animation);
}
else {
if (last->_loop) {
delay += duration * (1 + (int)(last->_trackTime / duration));
} else {
delay += duration;
}
delay -= _data.getMix(last->_animation, animation);
} else {
delay = 0;
}
}