mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 01:36:02 +08:00
[lua] Fix for #1064, delay was calculated incorrectly for non-loop previous track entries.
This commit is contained in:
parent
f56937c042
commit
b5e5d4aabb
@ -720,7 +720,12 @@ function AnimationState:addAnimation (trackIndex, animation, loop, delay)
|
||||
if delay <= 0 then
|
||||
local duration = last.animationEnd - last.animationStart
|
||||
if duration ~= 0 then
|
||||
delay = delay + duration * (1 + math_floor(last.trackTime / duration)) - data:getMix(last.animation, animation)
|
||||
if last.loop then
|
||||
delay = delay + duration * (1 + math_floor(last.trackTime / duration))
|
||||
else
|
||||
delay = delay + duration
|
||||
end
|
||||
delay = delay - data:getMix(last.animation, animation)
|
||||
else
|
||||
delay = 0
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user