Normalizes how some lighting things GC
This commit is contained in:
@@ -35,9 +35,7 @@
|
||||
return
|
||||
|
||||
if (!light_power || !light_range) // We won't emit light anyways, destroy the light source.
|
||||
if(light)
|
||||
light.destroy()
|
||||
light = null
|
||||
QDEL_NULL(light)
|
||||
else
|
||||
if (!istype(loc, /atom/movable)) // We choose what atom should be the top atom of the light here.
|
||||
. = src
|
||||
@@ -49,13 +47,6 @@
|
||||
else
|
||||
light = new/datum/light_source(src, .)
|
||||
|
||||
// Destroy our light source so we GC correctly.
|
||||
/atom/Destroy()
|
||||
if (light)
|
||||
light.destroy()
|
||||
light = null
|
||||
. = ..()
|
||||
|
||||
// If we have opacity, make sure to tell (potentially) affected light sources.
|
||||
/atom/movable/Destroy()
|
||||
var/turf/T = loc
|
||||
|
||||
Reference in New Issue
Block a user