From 1f704aec5e1f074a4befad253fdf8ea2b7134854 Mon Sep 17 00:00:00 2001 From: John Date: Tue, 24 Oct 2017 00:41:35 +0800 Subject: [PATCH] [csharp] Don't use the dip fix if mixing is complete. Based on: https://github.com/EsotericSoftware/spine-runtimes/commit/28fd5aff095ac05c35de0e9291f1a3cc28282183 See https://github.com/EsotericSoftware/spine-runtimes/issues/1024 --- spine-csharp/src/AnimationState.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/spine-csharp/src/AnimationState.cs b/spine-csharp/src/AnimationState.cs index f992efe0c..6e2dfb5b4 100644 --- a/spine-csharp/src/AnimationState.cs +++ b/spine-csharp/src/AnimationState.cs @@ -258,13 +258,17 @@ namespace Spine { break; case Dip: pose = MixPose.Setup; - alpha = alphaDip; + alpha = mix == 1 ? 0 : alphaDip; break; default: pose = MixPose.Setup; - alpha = alphaDip; - var dipMix = timelineDipMix[i]; - alpha *= Math.Max(0, 1 - dipMix.mixTime / dipMix.mixDuration); + if (mix == 1) { + alpha = 0; + } else { + alpha = alphaDip; + var dipMix = timelineDipMix[i]; + alpha *= Math.Max(0, 1 - dipMix.mixTime / dipMix.mixDuration); + } break; } from.totalAlpha += alpha;