From 42eb6b9eeaa62ba9cd83d07fc0dc06f67593d25f Mon Sep 17 00:00:00 2001 From: Aronai Sieyes Date: Fri, 18 Jun 2021 13:50:28 -0400 Subject: [PATCH] Add debugging code to find source of qdels These objects are being deleted by something, but I don't know what. --- code/datums/components/overlay_lighting.dm | 13 ++++++++++--- code/game/objects/effects/misc.dm | 6 ++++++ code/game/objects/effects/overlays.dm | 13 ++++++++++++- 3 files changed, 28 insertions(+), 4 deletions(-) diff --git a/code/datums/components/overlay_lighting.dm b/code/datums/components/overlay_lighting.dm index cfc0f1e921..a037e7fab1 100644 --- a/code/datums/components/overlay_lighting.dm +++ b/code/datums/components/overlay_lighting.dm @@ -156,10 +156,17 @@ set_parent_attached_to(null) set_holder(null) clean_old_turfs() - QDEL_NULL(visible_mask) + + qdel(visible_mask, TRUE) + visible_mask = null + if(directional) - QDEL_NULL(directional_atom) - QDEL_NULL(cone) + qdel(directional_atom, TRUE) + directional_atom = null + + qdel(cone, TRUE) + cone = null + return ..() diff --git a/code/game/objects/effects/misc.dm b/code/game/objects/effects/misc.dm index aac5b6ffa0..da76144aef 100644 --- a/code/game/objects/effects/misc.dm +++ b/code/game/objects/effects/misc.dm @@ -100,3 +100,9 @@ /obj/effect/abstract/directional_lighting mouse_opacity = MOUSE_OPACITY_TRANSPARENT + +/obj/effect/abstract/directional_lighting/Destroy(force) + if(!force) + stack_trace("Directional light atom deleted, but not by our component") + return QDEL_HINT_LETMELIVE + return ..() diff --git a/code/game/objects/effects/overlays.dm b/code/game/objects/effects/overlays.dm index 3657e34604..991366362a 100644 --- a/code/game/objects/effects/overlays.dm +++ b/code/game/objects/effects/overlays.dm @@ -143,6 +143,12 @@ vis_flags = NONE blocks_emissive = FALSE +/obj/effect/overlay/light_visible/Destroy(force) + if(!force) + stack_trace("Movable light visible mask deleted, but not by our component") + return QDEL_HINT_LETMELIVE + return ..() + /obj/effect/overlay/light_cone name = "" icon = 'icons/effects/light_overlays/light_cone.dmi' @@ -153,4 +159,9 @@ vis_flags = NONE alpha = 110 blocks_emissive = FALSE - \ No newline at end of file + +/obj/effect/overlay/light_cone/Destroy(force) + if(!force) + stack_trace("Directional light cone deleted, but not by our component") + return QDEL_HINT_LETMELIVE + return ..()