diff options
Diffstat (limited to 'modules/raycast/raycast_occlusion_cull.cpp')
-rw-r--r-- | modules/raycast/raycast_occlusion_cull.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/raycast/raycast_occlusion_cull.cpp b/modules/raycast/raycast_occlusion_cull.cpp index dd5eef8b2b..2e0d17fb28 100644 --- a/modules/raycast/raycast_occlusion_cull.cpp +++ b/modules/raycast/raycast_occlusion_cull.cpp @@ -270,13 +270,14 @@ void RaycastOcclusionCull::scenario_set_instance(RID p_scenario, RID p_instance, OccluderInstance &instance = scenario.instances[p_instance]; + bool changed = false; + if (instance.removed) { instance.removed = false; scenario.removed_instances.erase(p_instance); + changed = true; // It was removed and re-added, we might have missed some changes } - bool changed = false; - if (instance.occluder != p_occluder) { Occluder *old_occluder = occluder_owner.get_or_null(instance.occluder); if (old_occluder) { |