FTI - Change SceneTree global setting to static
Also fixup FTI configuration warnings so that they only output when the project is using FTI.
This commit is contained in:
@@ -216,7 +216,7 @@ void Light2D::_notification(int p_what) {
|
||||
} break;
|
||||
|
||||
case NOTIFICATION_RESET_PHYSICS_INTERPOLATION: {
|
||||
if (is_visible_in_tree() && is_physics_interpolated()) {
|
||||
if (is_visible_in_tree() && is_physics_interpolated_and_enabled()) {
|
||||
// Explicitly make sure the transform is up to date in RenderingServer before
|
||||
// resetting. This is necessary because NOTIFICATION_TRANSFORM_CHANGED
|
||||
// is normally deferred, and a client change to transform will not always be sent
|
||||
|
||||
@@ -206,7 +206,7 @@ void LightOccluder2D::_notification(int p_what) {
|
||||
} break;
|
||||
|
||||
case NOTIFICATION_RESET_PHYSICS_INTERPOLATION: {
|
||||
if (is_visible_in_tree() && is_physics_interpolated()) {
|
||||
if (is_visible_in_tree() && is_physics_interpolated_and_enabled()) {
|
||||
// Explicitly make sure the transform is up to date in RenderingServer before
|
||||
// resetting. This is necessary because NOTIFICATION_TRANSFORM_CHANGED
|
||||
// is normally deferred, and a client change to transform will not always be sent
|
||||
|
||||
@@ -173,7 +173,7 @@ void PhysicsBody2D::remove_collision_exception_with(Node *p_node) {
|
||||
PackedStringArray PhysicsBody2D::get_configuration_warnings() const {
|
||||
PackedStringArray warnings = CollisionObject2D::get_configuration_warnings();
|
||||
|
||||
if (!is_physics_interpolated()) {
|
||||
if (SceneTree::is_fti_enabled_in_project() && !is_physics_interpolated()) {
|
||||
warnings.push_back(RTR("PhysicsBody2D will not work correctly on a non-interpolated branch of the SceneTree.\nCheck the node's inherited physics_interpolation_mode."));
|
||||
}
|
||||
|
||||
|
||||
@@ -239,7 +239,7 @@ void TileMapLayer::_rendering_update(bool p_force_cleanup) {
|
||||
}
|
||||
|
||||
// Update all dirty quadrants.
|
||||
bool needs_set_not_interpolated = is_inside_tree() && get_tree()->is_physics_interpolation_enabled() && !is_physics_interpolated();
|
||||
bool needs_set_not_interpolated = SceneTree::is_fti_enabled() && !is_physics_interpolated();
|
||||
for (SelfList<RenderingQuadrant> *quadrant_list_element = dirty_rendering_quadrant_list.first(); quadrant_list_element;) {
|
||||
SelfList<RenderingQuadrant> *next_quadrant_list_element = quadrant_list_element->next(); // "Hack" to clear the list while iterating.
|
||||
|
||||
@@ -593,7 +593,7 @@ void TileMapLayer::_rendering_occluders_update_cell(CellData &r_cell_data) {
|
||||
bool transpose = (r_cell_data.cell.alternative_tile & TileSetAtlasSource::TRANSFORM_TRANSPOSE);
|
||||
|
||||
// Create, update or clear occluders.
|
||||
bool needs_set_not_interpolated = is_inside_tree() && get_tree()->is_physics_interpolation_enabled() && !is_physics_interpolated();
|
||||
bool needs_set_not_interpolated = SceneTree::is_fti_enabled() && !is_physics_interpolated();
|
||||
for (uint32_t occlusion_layer_index = 0; occlusion_layer_index < r_cell_data.occluders.size(); occlusion_layer_index++) {
|
||||
LocalVector<RID> &occluders = r_cell_data.occluders[occlusion_layer_index];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user