Merge pull request #52543 from TokageItLab/fixed-transition-when-xfade-time-is-zero

Fixed `AnimationNodeTransition`'s behavior when xfade time is zero
This commit is contained in:
Rémi Verschelde 2021-09-20 13:19:29 +02:00 committed by GitHub
commit d54635d9b0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -718,7 +718,7 @@ double AnimationNodeTransition::process(double p_time, bool p_seek) {
} else { // cross-fading from prev to current
float blend = xfade ? (prev_xfading / xfade) : 1;
float blend = xfade == 0 ? 0 : (prev_xfading / xfade);
if (!p_seek && switched) { //just switched, seek to start of current