Explorar o código

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

badlogic %!s(int64=8) %!d(string=hai) anos
pai
achega
ed2594deca
Modificáronse 1 ficheiros con 3 adicións e 2 borrados
  1. 3 2
      spine-csharp/src/AnimationState.cs

+ 3 - 2
spine-csharp/src/AnimationState.cs

@@ -220,9 +220,10 @@ namespace Spine {
 			if (from.mixingFrom != null) ApplyMixingFrom(from, skeleton, currentPose);
 			if (from.mixingFrom != null) ApplyMixingFrom(from, skeleton, currentPose);
 
 
 			float mix;
 			float mix;
-			if (to.mixDuration == 0) // Single frame mix to undo mixingFrom changes.
+			if (to.mixDuration == 0) { // Single frame mix to undo mixingFrom changes.
 				mix = 1;
 				mix = 1;
-			else {
+				currentPose = MixPose.Setup;
+			} else {
 				mix = to.mixTime / to.mixDuration;
 				mix = to.mixTime / to.mixDuration;
 				if (mix > 1) mix = 1;
 				if (mix > 1) mix = 1;
 			}
 			}