Merge pull request #82358 from jsjtxietian/fix-can-not-set-process-priority-of-node-in-editor

Fix can not set process priority of node in certain cases
This commit is contained in:
Rémi Verschelde 2023-09-26 13:45:36 +02:00
commit 008b08b5fb
No known key found for this signature in database
GPG Key ID: C3336907360768E1

View File

@ -968,7 +968,11 @@ void Node::set_process_priority(int p_priority) {
if (_is_any_processing()) {
_remove_from_process_thread_group();
data.process_priority = p_priority;
}
data.process_priority = p_priority;
if (_is_any_processing()) {
_add_to_process_thread_group();
}
}
@ -990,7 +994,11 @@ void Node::set_physics_process_priority(int p_priority) {
if (_is_any_processing()) {
_remove_from_process_thread_group();
data.physics_process_priority = p_priority;
}
data.physics_process_priority = p_priority;
if (_is_any_processing()) {
_add_to_process_thread_group();
}
}