From 8bbc713ebf40a6e395fac5ecdc654da39ca86d00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20J=2E=20Est=C3=A9banez?= Date: Fri, 9 Jun 2023 13:05:07 +0200 Subject: [PATCH] Fix node idle process priority being ignored --- scene/main/scene_tree.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/scene/main/scene_tree.cpp b/scene/main/scene_tree.cpp index b18369dd11f..7c43368f961 100644 --- a/scene/main/scene_tree.cpp +++ b/scene/main/scene_tree.cpp @@ -905,11 +905,16 @@ void SceneTree::_process_group(ProcessGroup *p_group, bool p_physics) { return; } - bool &node_order_dirty = p_physics ? p_group->physics_node_order_dirty : p_group->node_order_dirty; - - if (node_order_dirty) { - nodes.sort_custom(); - node_order_dirty = false; + if (p_physics) { + if (p_group->physics_node_order_dirty) { + nodes.sort_custom(); + p_group->physics_node_order_dirty = false; + } + } else { + if (p_group->node_order_dirty) { + nodes.sort_custom(); + p_group->node_order_dirty = false; + } } // Make a copy, so if nodes are added/removed from process, this does not break