http://www.esotericsoftware.com/forum/viewtopic.php?f=7&t=1447
@@ -202,7 +202,7 @@ public class AnimationState {
if (delay <= 0) {
if (last)
- delay += last.endTime - _data.getMix(last.animation, animation);
+ delay += Math.max(0, last.endTime - last.time) - _data.getMix(last.animation, animation);
else
delay = 0;
}
@@ -266,7 +266,9 @@ spTrackEntry* spAnimationState_addAnimation (spAnimationState* self, int trackIn
if (last) {
- delay += last->endTime;
+ float remaining = last->endTime - last->time;
+ if (remaining < 0) remaining = 0;
+ delay += remaining;
if (animation) delay -= spAnimationStateData_getMix(self->data, last->animation, animation);
} else
@@ -214,7 +214,7 @@ namespace Spine {
if (last != null)
- delay += last.endTime - data.GetMix(last.animation, animation);
+ delay += Math.Max(0, last.endTime - last.time) - data.GetMix(last.animation, animation);
@@ -233,7 +233,7 @@ public class AnimationState {
- delay += last.endTime - data.getMix(last.animation, animation);
+ delay += Math.max(0, last.endTime - last.time) - data.getMix(last.animation, animation);
@@ -201,7 +201,9 @@ function AnimationState.new (data)
delay = delay or 0
if delay <= 0 then
if last then
- delay = delay + last.endTime - self.data:getMix(last.animation.name, animation.name)
+ local remaining = last.endTime - last.time
+ if remaining < 0 then remaining = 0 end
+ delay = delay + remaining - self.data:getMix(last.animation.name, animation.name)
delay = 0
end