diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-09-20 13:19:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-20 13:19:29 +0200 |
commit | d54635d9b0fc108b23519cab60c9306be947be03 (patch) | |
tree | ad725e27ae9a723cbadceae0380e5e433def58a0 | |
parent | 80e2c084cdd89f4a8a0f6deac77d79d3e46cea70 (diff) | |
parent | 02d81664275c6559237216887a9703796ab4fe1a (diff) |
Merge pull request #52543 from TokageItLab/fixed-transition-when-xfade-time-is-zero
Fixed `AnimationNodeTransition`'s behavior when xfade time is zero
-rw-r--r-- | scene/animation/animation_blend_tree.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/animation/animation_blend_tree.cpp b/scene/animation/animation_blend_tree.cpp index d11387902a..91755b5824 100644 --- a/scene/animation/animation_blend_tree.cpp +++ b/scene/animation/animation_blend_tree.cpp @@ -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 |