Fix weird behavior of teleporting to self-state when reset is false
This commit is contained in:
parent
c3539b4561
commit
a6d8afc90c
1 changed files with 5 additions and 3 deletions
|
@ -411,9 +411,11 @@ double AnimationNodeStateMachinePlayback::_process(AnimationNodeStateMachine *p_
|
|||
// can't travel, then teleport
|
||||
if (p_state_machine->states.has(travel_request)) {
|
||||
path.clear();
|
||||
current = travel_request;
|
||||
play_start = true;
|
||||
reset_request = reset_request_on_teleport;
|
||||
if (current != travel_request || reset_request_on_teleport) {
|
||||
current = travel_request;
|
||||
play_start = true;
|
||||
reset_request = reset_request_on_teleport;
|
||||
}
|
||||
} else {
|
||||
StringName node = travel_request;
|
||||
travel_request = StringName();
|
||||
|
|
Loading…
Reference in a new issue