From cee37f0234329444271fb5f8371f3de8c8fe7579 Mon Sep 17 00:00:00 2001 From: lawnjelly Date: Thu, 9 Oct 2025 10:56:01 +0100 Subject: [PATCH] FTI - Fix `SceneTreeFTI` depth limit behaviour Fixes off by one bug, and increases the limit slightly. --- scene/main/scene_tree_fti.cpp | 2 +- scene/main/scene_tree_fti.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scene/main/scene_tree_fti.cpp b/scene/main/scene_tree_fti.cpp index 17bfde28349..ee8dc25c50e 100644 --- a/scene/main/scene_tree_fti.cpp +++ b/scene/main/scene_tree_fti.cpp @@ -286,7 +286,7 @@ void SceneTreeFTI::_create_depth_lists() { // This shouldn't happen, but wouldn't be terrible if it did. DEV_ASSERT(depth >= 0); - depth = MIN(depth, (int32_t)data.scene_tree_depth_limit); + depth = MIN(depth, (int32_t)data.scene_tree_depth_limit - 1); LocalVector &dest_list = data.dirty_node_depth_lists[depth]; #ifdef GODOT_SCENE_TREE_FTI_EXTRA_CHECKS diff --git a/scene/main/scene_tree_fti.h b/scene/main/scene_tree_fti.h index cdea9be1b8b..9997ff8cfc0 100644 --- a/scene/main/scene_tree_fti.h +++ b/scene/main/scene_tree_fti.h @@ -77,7 +77,7 @@ class SceneTreeFTI { }; struct Data { - static const uint32_t scene_tree_depth_limit = 32; + static const uint32_t scene_tree_depth_limit = 48; // Prev / Curr lists of Node3Ds having local xforms pumped. LocalVector tick_xform_list[2];