@@ -933,9 +933,11 @@ void Node::set_process_thread_group_order(int p_order) {
933
933
if (data.process_thread_group_order == p_order) {
934
934
return ;
935
935
}
936
- // Make sure we are in SceneTree and an actual process owner
936
+
937
+ data.process_thread_group_order = p_order;
938
+
939
+ // Not yet in the tree (or not a group owner, in whose case this is pointless but harmless); trivial update.
937
940
if (!is_inside_tree () || data.process_thread_group_owner != this ) {
938
- data.process_thread_group_order = p_order;
939
941
return ;
940
942
}
941
943
@@ -951,8 +953,8 @@ void Node::set_process_priority(int p_priority) {
951
953
if (data.process_priority == p_priority) {
952
954
return ;
953
955
}
954
- // Make sure we are in SceneTree and an actual process owner
955
956
if (!is_inside_tree ()) {
957
+ // Not yet in the tree; trivial update.
956
958
data.process_priority = p_priority;
957
959
return ;
958
960
}
@@ -973,8 +975,8 @@ void Node::set_physics_process_priority(int p_priority) {
973
975
if (data.physics_process_priority == p_priority) {
974
976
return ;
975
977
}
976
- // Make sure we are in SceneTree and an actual physics_process owner
977
978
if (!is_inside_tree ()) {
979
+ // Not yet in the tree; trivial update.
978
980
data.physics_process_priority = p_priority;
979
981
return ;
980
982
}
@@ -997,11 +999,11 @@ void Node::set_process_thread_group(ProcessThreadGroup p_mode) {
997
999
}
998
1000
999
1001
if (!is_inside_tree ()) {
1002
+ // Not yet in the tree; trivial update.
1000
1003
data.process_thread_group = p_mode;
1001
1004
return ;
1002
1005
}
1003
1006
1004
- // Mode changed, must update everything.
1005
1007
_remove_tree_from_process_thread_group ();
1006
1008
if (data.process_thread_group != PROCESS_THREAD_GROUP_INHERIT) {
1007
1009
_remove_process_group ();
@@ -1031,7 +1033,7 @@ Node::ProcessThreadGroup Node::get_process_thread_group() const {
1031
1033
1032
1034
void Node::set_process_thread_messages (BitField<ProcessThreadMessages> p_flags) {
1033
1035
ERR_THREAD_GUARD
1034
- if (data.process_thread_group_order == p_flags) {
1036
+ if (data.process_thread_messages == p_flags) {
1035
1037
return ;
1036
1038
}
1037
1039
0 commit comments