summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2018-12-17 08:11:48 +0100
committerGitHub <noreply@github.com>2018-12-17 08:11:48 +0100
commit4b6e7b50b9a0f4f7496b2d01cd07e6c386679abe (patch)
tree1f3f06e00c78095fada490670286937f798f71ec
parent38f8269e1bb64abf757f5a16723e67ffb3744905 (diff)
parent4c5548e06e6d6d57b7c377198e1a10cb5e444d14 (diff)
Merge pull request #24411 from guilhermefelipecgs/fix_22389
Fix sub-transitions not using end_node correctly
-rw-r--r--scene/animation/animation_node_state_machine.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/scene/animation/animation_node_state_machine.cpp b/scene/animation/animation_node_state_machine.cpp
index a7af3f687b..f67ef8164a 100644
--- a/scene/animation/animation_node_state_machine.cpp
+++ b/scene/animation/animation_node_state_machine.cpp
@@ -480,10 +480,9 @@ float AnimationNodeStateMachinePlayback::process(AnimationNodeStateMachine *sm,
}
//compute time left for transitions by using the end node
-
if (sm->end_node != StringName() && sm->end_node != current) {
- rem = sm->blend_node(current, sm->states[sm->end_node].node, 0, true, 0, AnimationNode::FILTER_IGNORE, false);
+ rem = sm->blend_node(sm->end_node, sm->states[sm->end_node].node, 0, true, 0, AnimationNode::FILTER_IGNORE, false);
}
return rem;