Merge pull request #71840 from TokageItLab/fix-travel-reset
Fix weird behavior of teleporting to self-state when `reset_on_teleport` is `false` in StateMachine
This commit is contained in:
commit
285e6ed9a5
|
@ -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 New Issue