Răsfoiți Sursa

Merge pull request #24411 from guilhermefelipecgs/fix_22389

Fix sub-transitions not using end_node correctly
Rémi Verschelde 6 ani în urmă
părinte
comite
4b6e7b50b9
1 a modificat fișierele cu 1 adăugiri și 2 ștergeri
  1. 1 2
      scene/animation/animation_node_state_machine.cpp

+ 1 - 2
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
 	//compute time left for transitions by using the end node
-
 	if (sm->end_node != StringName() && sm->end_node != current) {
 	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;
 	return rem;