Merge pull request #33798 from capnm/capnm-fix-33749

Setting the node process priority should not trigger an error
This commit is contained in:
Rémi Verschelde 2019-11-22 09:02:40 +01:00 committed by GitHub
commit fd6394e217
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -835,19 +835,26 @@ bool Node::is_processing_internal() const {
void Node::set_process_priority(int p_priority) {
data.process_priority = p_priority;
ERR_FAIL_COND(!data.tree);
// Make sure we are in SceneTree.
if (data.tree == NULL) {
return;
}
if (is_processing())
if (is_processing()) {
data.tree->make_group_changed("idle_process");
}
if (is_processing_internal())
if (is_processing_internal()) {
data.tree->make_group_changed("idle_process_internal");
}
if (is_physics_processing())
if (is_physics_processing()) {
data.tree->make_group_changed("physics_process");
}
if (is_physics_processing_internal())
if (is_physics_processing_internal()) {
data.tree->make_group_changed("physics_process_internal");
}
}
int Node::get_process_priority() const {