From c66113e19db168ef7a29277ca593e4c8cf243c6d Mon Sep 17 00:00:00 2001 From: badlogic Date: Mon, 4 Mar 2019 17:05:03 +0100 Subject: [PATCH] [csharp] Fix for #1290, do not carry over time when timeScale of a track entry taht's being replaced by a new one is 0. --- spine-csharp/src/AnimationState.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spine-csharp/src/AnimationState.cs b/spine-csharp/src/AnimationState.cs index 4094ff226..405dcda7d 100644 --- a/spine-csharp/src/AnimationState.cs +++ b/spine-csharp/src/AnimationState.cs @@ -98,7 +98,7 @@ namespace Spine { float nextTime = current.trackLast - next.delay; if (nextTime >= 0) { next.delay = 0; - next.trackTime = (nextTime / current.timeScale + delta) * next.timeScale; + next.trackTime = current.timeScale == 0 ? 0 : (nextTime / current.timeScale + delta) * next.timeScale; current.trackTime += currentDelta; SetCurrent(i, next, true); while (next.mixingFrom != null) {