Browse Source

[lua] Apply left over time additively to track time of delayed TrackEntry. See #1504.

badlogic 6 years ago
parent
commit
ce86f669f5
1 changed files with 2 additions and 2 deletions
  1. 2 2
      spine-lua/AnimationState.lua

+ 2 - 2
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)