[c] Fix not returning to setup pose when multiple mixing from entries end at same time. See #1027

This commit is contained in:
badlogic 2017-10-28 09:43:26 +02:00
parent bb23c5e25c
commit a8c5282653

View File

@ -419,9 +419,10 @@ float _spAnimationState_applyMixingFrom (spAnimationState* self, spTrackEntry* t
spTrackEntry* from = to->mixingFrom;
if (from->mixingFrom) _spAnimationState_applyMixingFrom(self, from, skeleton, currentPose);
if (to->mixDuration == 0) /* Single frame mix to undo mixingFrom changes. */
if (to->mixDuration == 0) { /* Single frame mix to undo mixingFrom changes. */
mix = 1;
else {
currentPose = SP_MIX_POSE_SETUP;
} else {
mix = to->mixTime / to->mixDuration;
if (mix > 1) mix = 1;
}