Browse Source

[csharp] Port of bugfix commits 8e21d09 and 9b37c31, resetting mixBlend and stepped timelines. See #1903.

Harald Csaszar 4 years ago
parent
commit
950760903b
2 changed files with 4 additions and 2 deletions
  1. 1 0
      spine-csharp/src/AnimationState.cs
  2. 3 2
      spine-csharp/src/SkeletonJson.cs

+ 1 - 0
spine-csharp/src/AnimationState.cs

@@ -832,6 +832,7 @@ namespace Spine {
 			entry.interruptAlpha = 1;
 			entry.mixTime = 0;
 			entry.mixDuration = last == null ? 0 : data.GetMix(last.animation, animation);
+			entry.mixBlend = MixBlend.Replace;
 			return entry;
 		}
 

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

@@ -1107,8 +1107,9 @@ namespace Spine {
 		static int ReadCurve (object curve, CurveTimeline timeline, int bezier, int frame, int value, float time1, float time2,
 			float value1, float value2, float scale) {
 
-			if (curve is string) {
-				if (value != 0) timeline.SetStepped(frame);
+			string curveString = curve as string;
+			if (curveString != null) {
+				if (curveString == "stepped") timeline.SetStepped(frame);
 				return bezier + 1;
 			}
 			var curveValues = (List<object>)curve;