[csharp] Limit linked list by speeding up, see 0f944b2baf

This commit is contained in:
pharan 2017-05-18 09:11:42 +08:00
parent f5c8a36391
commit 5d78359b7c

View File

@ -140,9 +140,13 @@ namespace Spine {
// Require mixTime > 0 to ensure the mixing from entry was applied at least once.
if (entry.mixTime > 0 && (entry.mixTime >= entry.mixDuration || entry.timeScale == 0)) {
if (animationCount > 6 && from.mixingFrom == null) { // Limit the mixing from linked list.
entry.mixingFrom = null;
queue.End(from);
if (animationCount > 5 && from.mixingFrom == null) {
// Limit linked list by speeding up and removing old entries.
entry.interruptAlpha = Math.Max(0, entry.interruptAlpha - delta * 0.66f);
if (entry.interruptAlpha <= 0) {
entry.mixingFrom = null;
queue.End(from);
}
}
return finished;
}