Fix weird behavior of teleporting to self-state when reset is false

This commit is contained in:
Silc Renew 2023-01-22 16:16:48 +09:00
parent c3539b4561
commit a6d8afc90c

View file

@ -411,9 +411,11 @@ double AnimationNodeStateMachinePlayback::_process(AnimationNodeStateMachine *p_
// can't travel, then teleport
if (p_state_machine->states.has(travel_request)) {
path.clear();
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();