summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuilherme Felipe <guilhermefelipecgs@gmail.com>2018-12-16 23:40:41 -0200
committerGuilherme Felipe <guilhermefelipecgs@gmail.com>2018-12-16 23:40:41 -0200
commit4c5548e06e6d6d57b7c377198e1a10cb5e444d14 (patch)
tree409f93c139a56bad2e242131ee31862c85085ac8
parent09623ffc4e415531df257e31c8e3b0ad3ab9ec06 (diff)
Fix sub-transitions not using end_node correctly
Fix #22389
-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;