Browse Source

[c] Fix not returning to setup pose when multiple mixing from entries end at same time. See #1027

badlogic 8 years ago
parent
commit
a8c5282653
1 changed files with 3 additions and 2 deletions
  1. 3 2
      spine-c/spine-c/src/spine/AnimationState.c

+ 3 - 2
spine-c/spine-c/src/spine/AnimationState.c

@@ -419,9 +419,10 @@ float _spAnimationState_applyMixingFrom (spAnimationState* self, spTrackEntry* t
 	spTrackEntry* from = to->mixingFrom;
 	if (from->mixingFrom) _spAnimationState_applyMixingFrom(self, from, skeleton, currentPose);
 
-	if (to->mixDuration == 0) /* Single frame mix to undo mixingFrom changes. */
+	if (to->mixDuration == 0) { /* Single frame mix to undo mixingFrom changes. */
 		mix = 1;
-	else {
+		currentPose = SP_MIX_POSE_SETUP;
+	} else {
 		mix = to->mixTime / to->mixDuration;
 		if (mix > 1) mix = 1;
 	}