From ce86f669f559b82c3822d2119256d3fbdb42174a Mon Sep 17 00:00:00 2001 From: badlogic Date: Thu, 26 Sep 2019 11:34:41 +0200 Subject: [PATCH] [lua] Apply left over time additively to track time of delayed TrackEntry. See #1504. --- spine-lua/AnimationState.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spine-lua/AnimationState.lua b/spine-lua/AnimationState.lua index 21fd06d32..7e5b8ae86 100644 --- a/spine-lua/AnimationState.lua +++ b/spine-lua/AnimationState.lua @@ -252,9 +252,9 @@ function AnimationState:update (delta) if nextTime >= 0 then _next.delay = 0 if current.timeScale == 0 then - _next.trackTime = 0 + _next.trackTime = _next.trackTime + 0 else - _next.trackTime = (nextTime / current.timeScale + delta) * _next.timeScale + _next.trackTime = _next.trackTime + (nextTime / current.timeScale + delta) * _next.timeScale end current.trackTime = current.trackTime + currentDelta self:setCurrent(i, _next, true)