mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-20 09:16:01 +08:00
[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:
parent
c66113e19d
commit
2db16cc384
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user