mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
Don't use setup pose for last apply when there is a next animation.
http://esotericsoftware.com/forum/Mixing-fail-in-cocos2d-x-8200?p=38086#p38086
This commit is contained in:
parent
f35bbc33f5
commit
47155e4427
@ -108,14 +108,12 @@ public class AnimationState {
|
|||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
} else {
|
} else if (current.trackLast >= current.trackEnd && current.mixingFrom == null) {
|
||||||
// Clear the track when there is no next entry, the track end time is reached, and there is no mixingFrom.
|
// Clear the track when there is no next entry, the track end time is reached, and there is no mixingFrom.
|
||||||
if (current.trackLast >= current.trackEnd && current.mixingFrom == null) {
|
tracks.set(i, null);
|
||||||
tracks.set(i, null);
|
queue.end(current);
|
||||||
queue.end(current);
|
disposeNext(current);
|
||||||
disposeNext(current);
|
continue;
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
updateMixingFrom(current, delta);
|
updateMixingFrom(current, delta);
|
||||||
|
|
||||||
@ -159,7 +157,7 @@ public class AnimationState {
|
|||||||
float mix = current.alpha;
|
float mix = current.alpha;
|
||||||
if (current.mixingFrom != null)
|
if (current.mixingFrom != null)
|
||||||
mix *= applyMixingFrom(current, skeleton);
|
mix *= applyMixingFrom(current, skeleton);
|
||||||
else if (current.trackTime >= current.trackEnd) //
|
else if (current.trackTime >= current.trackEnd && current.next == null) //
|
||||||
mix = 0; // Set to setup pose the last time the entry will be applied.
|
mix = 0; // Set to setup pose the last time the entry will be applied.
|
||||||
|
|
||||||
// Apply current entry.
|
// Apply current entry.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user