Normalizes how some lighting things GC

This commit is contained in:
CitadelStationBot
2017-04-18 18:02:20 -05:00
parent 6f0aa809df
commit 53ac3bcb82
5 changed files with 12 additions and 24 deletions
+1 -10
View File
@@ -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