瀏覽代碼

[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.

badlogic 6 年之前
父節點
當前提交
c66113e19d
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      spine-csharp/src/AnimationState.cs

+ 1 - 1
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) {