Fix state machine priority for auto advance

This commit is contained in:
Guilherme Felipe 2019-02-12 15:57:26 -02:00
parent c4835c4345
commit 67eda1d4dd
1 changed files with 2 additions and 1 deletions

View File

@ -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;
}
}