diff options
Diffstat (limited to 'scene/animation/animation_node_state_machine.cpp')
-rw-r--r-- | scene/animation/animation_node_state_machine.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/scene/animation/animation_node_state_machine.cpp b/scene/animation/animation_node_state_machine.cpp index 7c4f84b373..17ce05f130 100644 --- a/scene/animation/animation_node_state_machine.cpp +++ b/scene/animation/animation_node_state_machine.cpp @@ -186,8 +186,9 @@ bool AnimationNodeStateMachinePlayback::_travel(AnimationNodeStateMachine *p_sta path.clear(); //a new one will be needed - if (current == p_travel) + if (current == p_travel) { return true; //nothing to do + } loops_current = 0; // reset loops, so fade does not happen immediately @@ -698,16 +699,18 @@ void AnimationNodeStateMachine::get_node_list(List<StringName> *r_nodes) const { bool AnimationNodeStateMachine::has_transition(const StringName &p_from, const StringName &p_to) const { for (int i = 0; i < transitions.size(); i++) { - if (transitions[i].from == p_from && transitions[i].to == p_to) + if (transitions[i].from == p_from && transitions[i].to == p_to) { return true; + } } return false; } int AnimationNodeStateMachine::find_transition(const StringName &p_from, const StringName &p_to) const { for (int i = 0; i < transitions.size(); i++) { - if (transitions[i].from == p_from && transitions[i].to == p_to) + if (transitions[i].from == p_from && transitions[i].to == p_to) { return i; + } } return -1; } |