瀏覽代碼

[lua] Ported fix for #1119

badlogic 7 年之前
父節點
當前提交
0f7b813c38
共有 1 個文件被更改,包括 4 次插入3 次删除
  1. 4 3
      spine-lua/AnimationState.lua

+ 4 - 3
spine-lua/AnimationState.lua

@@ -345,6 +345,9 @@ function AnimationState:updateMixingFrom (to, delta)
 
 
  	local finished = self:updateMixingFrom(from, delta)
  	local finished = self:updateMixingFrom(from, delta)
 	
 	
+	from.animationLast = from.nextAnimationLast
+	from.trackLast = from.nextTrackLast
+	
 	-- Require mixTime > 0 to ensure the mixing from entry was applied at least once.
 	-- Require mixTime > 0 to ensure the mixing from entry was applied at least once.
 	if (to.mixTime > 0 and (to.mixTime >= to.mixDuration or to.timeScale == 0)) then
 	if (to.mixTime > 0 and (to.mixTime >= to.mixDuration or to.timeScale == 0)) then
 		-- Require totalAlpha == 0 to ensure mixing is complete, unless mixDuration == 0 (the transition is a single frame).
 		-- Require totalAlpha == 0 to ensure mixing is complete, unless mixDuration == 0 (the transition is a single frame).
@@ -355,9 +358,7 @@ function AnimationState:updateMixingFrom (to, delta)
 		end
 		end
 		return finished
 		return finished
 	end
 	end
-
-	from.animationLast = from.nextAnimationLast
-	from.trackLast = from.nextTrackLast
+	
 	from.trackTime = from.trackTime + delta * from.timeScale
 	from.trackTime = from.trackTime + delta * from.timeScale
 	to.mixTime = to.mixTime + delta * to.timeScale
 	to.mixTime = to.mixTime + delta * to.timeScale
 	return false;
 	return false;