[lua] Fix for #1290, do not carry over time when timeScale of a track entry taht's being replaced by a new one is 0.

This commit is contained in:
badlogic 2019-03-04 17:06:50 +01:00
parent c66113e19d
commit 2db16cc384

View File

@ -249,7 +249,11 @@ function AnimationState:update (delta)
local nextTime = current.trackLast - _next.delay
if nextTime >= 0 then
_next.delay = 0
_next.trackTime = (nextTime / current.timeScale + delta) * _next.timeScale
if current.timeScale == 0 then
_next.trackTime = 0
else
_next.trackTime = (nextTime / current.timeScale + delta) * _next.timeScale
end
current.trackTime = current.trackTime + currentDelta
self:setCurrent(i, _next, true)
while _next.mixingFrom do