From 340cc6a85ba4195cf8449c62a36b8cbedda752ce Mon Sep 17 00:00:00 2001 From: badlogic Date: Fri, 4 Nov 2016 14:42:20 +0100 Subject: [PATCH] [lua] Closes #751, didn't clear self->events in AnimationState:queueEvents --- spine-lua/AnimationState.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/spine-lua/AnimationState.lua b/spine-lua/AnimationState.lua index 370f9837c..26686f87f 100644 --- a/spine-lua/AnimationState.lua +++ b/spine-lua/AnimationState.lua @@ -391,9 +391,10 @@ function AnimationState:applyRotateTimeline (timeline, skeleton, time, alpha, se local rotateTimeline = timeline local frames = rotateTimeline.frames - if time < frames[0] then return end -- Time is before first frame. - local bone = skeleton.bones[rotateTimeline.boneIndex] + if time < frames[0] then + return + end local r2 = 0 if time >= frames[zlen(frames) - Animation.RotateTimeline.ENTRIES] then -- Time is after last frame. @@ -491,7 +492,7 @@ function AnimationState:queueEvents (entry, animationTime) end i = i + 1 end - events = {} + self.events = {} end function AnimationState:clearTracks ()