mirror of
https://github.com/godotengine/godot.git
synced 2024-11-27 09:16:35 +08:00
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
|
// can't travel, then teleport
|
||||||
if (p_state_machine->states.has(travel_request)) {
|
if (p_state_machine->states.has(travel_request)) {
|
||||||
path.clear();
|
path.clear();
|
||||||
current = travel_request;
|
if (current != travel_request || reset_request_on_teleport) {
|
||||||
play_start = true;
|
current = travel_request;
|
||||||
reset_request = reset_request_on_teleport;
|
play_start = true;
|
||||||
|
reset_request = reset_request_on_teleport;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
StringName node = travel_request;
|
StringName node = travel_request;
|
||||||
travel_request = StringName();
|
travel_request = StringName();
|
||||||
|
Loading…
Reference in New Issue
Block a user