diff options
author | Guilherme Felipe <guilhermefelipecgs@gmail.com> | 2019-02-12 15:57:26 -0200 |
---|---|---|
committer | Guilherme Felipe <guilhermefelipecgs@gmail.com> | 2019-02-12 15:57:26 -0200 |
commit | 67eda1d4dd7373e8ea1a34901135d0b678581c09 (patch) | |
tree | 3584dd5cbef97f72b566255f4bb5dbfb8b2b828b /scene/animation | |
parent | c4835c434502e23148585324a16c2bdc1c943ca2 (diff) |
Fix state machine priority for auto advance
Diffstat (limited to 'scene/animation')
-rw-r--r-- | scene/animation/animation_node_state_machine.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scene/animation/animation_node_state_machine.cpp b/scene/animation/animation_node_state_machine.cpp index 08cc655cdd..5df3da93e1 100644 --- a/scene/animation/animation_node_state_machine.cpp +++ b/scene/animation/animation_node_state_machine.cpp @@ -421,7 +421,8 @@ float AnimationNodeStateMachinePlayback::process(AnimationNodeStateMachine *sm, if (sm->transitions[i].from == current && auto_advance) { - if (sm->transitions[i].transition->get_priority() < priority_best) { + if (sm->transitions[i].transition->get_priority() <= priority_best) { + priority_best = sm->transitions[i].transition->get_priority(); auto_advance_to = i; } } |