From 9f75f7dfc0db2f959bc3ff7a7c72a60c94838b95 Mon Sep 17 00:00:00 2001 From: Haoyu Qiu Date: Mon, 15 Apr 2024 00:06:24 +0800 Subject: [PATCH] Fix SceneTree not respecting virtual process methods Co-authored-by: Raul Santos --- scene/main/scene_tree.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scene/main/scene_tree.cpp b/scene/main/scene_tree.cpp index fa873906d..9261b9fb4 100644 --- a/scene/main/scene_tree.cpp +++ b/scene/main/scene_tree.cpp @@ -633,7 +633,9 @@ bool SceneTree::iteration(float p_time) { flush_transform_notifications(); - MainLoop::iteration(p_time); + if (MainLoop::iteration(p_time)) { + _quit = true; + } physics_process_time = p_time; emit_signal("physics_frame"); @@ -681,7 +683,9 @@ bool SceneTree::idle(float p_time) { root_lock++; - MainLoop::idle(p_time); + if (MainLoop::idle(p_time)) { + _quit = true; + } idle_process_time = p_time;