Hmm, that line should set current.mixAlpha
. Pharan! :angry:
For from.mixingFrom
to be non-null and from.mixDuration
to be 0, you'd have to be setting a new current animation without having applied the previous one. We have some code to discard animations that were set, not applied, and then replaced, so I'm not really sure how you got in that state.
Still, it doesn't hurt to avoid setting a NaN (mmmm naan) mixAlpha
. If mixDuration
is 0 then the mix
is 1 in this code: float alpha = from.alpha * entry.mixAlpha * (1 - mix)
, which means mixAlpha
gets multiplied by zero so its value doesn't matter. That makes the fix:
if (from.mixingFrom != null && from.mixDuration > 0)
current.mixAlpha *= Math.min(from.mixTime / from.mixDuration, 1);