[c][cpp] Port fix to AnimationState, see #1092

This commit is contained in:
badlogic 2018-03-28 14:09:14 +02:00
parent 4981aa69b9
commit 9651e0bc53
2 changed files with 4 additions and 4 deletions

View File

@ -733,11 +733,11 @@ spTrackEntry* spAnimationState_addAnimation (spAnimationState* self, int trackIn
if (last->loop) {
delay += duration * (1 + (int) (last->trackTime / duration));
} else {
delay += duration;
delay += MAX(duration, last->trackTime);
}
delay -= spAnimationStateData_getMix(self->data, last->animation, animation);
} else
delay = 0;
delay = last->trackTime;
}
}

View File

@ -582,11 +582,11 @@ TrackEntry *AnimationState::addAnimation(int trackIndex, Animation *animation, b
if (last->_loop) {
delay += duration * (1 + (int) (last->_trackTime / duration));
} else {
delay += duration;
delay += MathUtil::max(duration, last->_trackTime);
}
delay -= _data->getMix(last->_animation, animation);
} else {
delay = 0;
delay = last->_trackTime;
}
}
}