mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-01 13:19:08 +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
|
local nextTime = current.trackLast - _next.delay
|
||||||
if nextTime >= 0 then
|
if nextTime >= 0 then
|
||||||
_next.delay = 0
|
_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
|
current.trackTime = current.trackTime + currentDelta
|
||||||
self:setCurrent(i, _next, true)
|
self:setCurrent(i, _next, true)
|
||||||
while _next.mixingFrom do
|
while _next.mixingFrom do
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user