You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2026-01-05 19:31:35 +00:00
Fix AnimationNodeStateMachinePlayback start() on nonexistent node
This commit is contained in:
@@ -334,11 +334,17 @@ float AnimationNodeStateMachinePlayback::process(AnimationNodeStateMachine *p_st
|
||||
}
|
||||
} else {
|
||||
// teleport to start
|
||||
path.clear();
|
||||
current = start_request;
|
||||
playing = true;
|
||||
play_start = true;
|
||||
start_request = StringName(); //clear start request
|
||||
if (p_state_machine->states.has(start_request)) {
|
||||
path.clear();
|
||||
current = start_request;
|
||||
playing = true;
|
||||
play_start = true;
|
||||
start_request = StringName(); //clear start request
|
||||
} else {
|
||||
StringName node = start_request;
|
||||
start_request = StringName(); //clear start request
|
||||
ERR_FAIL_V_MSG(0, "No such node: '" + node + "'");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user