From 8bebabda1868bb6d0b4f1b144f78c0d1cff8653c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20J=2E=20Est=C3=A9banez?= Date: Tue, 21 Nov 2023 18:32:49 +0100 Subject: [PATCH] Let scene replacemnent benefit from certain late pieces of frame logic --- scene/main/scene_tree.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scene/main/scene_tree.cpp b/scene/main/scene_tree.cpp index d3347bc304e..cf80bd6c6fc 100644 --- a/scene/main/scene_tree.cpp +++ b/scene/main/scene_tree.cpp @@ -515,6 +515,10 @@ bool SceneTree::process(double p_time) { _flush_delete_queue(); + if (unlikely(pending_new_scene)) { + _flush_scene_change(); + } + process_timers(p_time, false); //go through timers process_tweens(p_time, false); @@ -550,10 +554,6 @@ bool SceneTree::process(double p_time) { #endif // _3D_DISABLED #endif // TOOLS_ENABLED - if (unlikely(pending_new_scene)) { - _flush_scene_change(); - } - return _quit; }