summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-09-20 13:19:29 +0200
committerGitHub <noreply@github.com>2021-09-20 13:19:29 +0200
commitd54635d9b0fc108b23519cab60c9306be947be03 (patch)
treead725e27ae9a723cbadceae0380e5e433def58a0
parent80e2c084cdd89f4a8a0f6deac77d79d3e46cea70 (diff)
parent02d81664275c6559237216887a9703796ab4fe1a (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.cpp2
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