소스 검색

Fixed interrupting a mix with a new entry that has 0 mixDuration.

closes #970
Nathan Sweet 8 년 전
부모
커밋
c8d595565b
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/AnimationState.java

+ 2 - 1
spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/AnimationState.java

@@ -144,7 +144,8 @@ public class AnimationState {
 
 		// Require mixTime > 0 to ensure the mixing from entry was applied at least once.
 		if (to.mixTime > 0 && (to.mixTime >= to.mixDuration || to.timeScale == 0)) {
-			if (from.totalAlpha == 0) {
+			// Require totalAlpha == 0 to ensure mixing is complete, unless mixDuration == 0 (the transition is a single frame).
+			if (from.totalAlpha == 0 || to.mixDuration == 0) {
 				to.mixingFrom = from.mixingFrom;
 				to.interruptAlpha = from.interruptAlpha;
 				queue.end(from);