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

This commit is contained in:
badlogic 2019-03-04 17:05:03 +01:00
parent ed5dee43ef
commit c66113e19d

View File

@ -98,7 +98,7 @@ namespace Spine {
float nextTime = current.trackLast - next.delay; float nextTime = current.trackLast - next.delay;
if (nextTime >= 0) { if (nextTime >= 0) {
next.delay = 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; current.trackTime += currentDelta;
SetCurrent(i, next, true); SetCurrent(i, next, true);
while (next.mixingFrom != null) { while (next.mixingFrom != null) {