diff --git a/code/modules/lighting/lighting_source.dm b/code/modules/lighting/lighting_source.dm index a6c28b4146..59ce11baeb 100644 --- a/code/modules/lighting/lighting_source.dm +++ b/code/modules/lighting/lighting_source.dm @@ -56,10 +56,10 @@ if (top_atom) LAZYREMOVE(top_atom.light_sources, src) - + if (needs_update) GLOB.lighting_update_lights -= src - + . = ..() // Yes this doesn't align correctly on anything other than 4 width tabs. @@ -116,7 +116,6 @@ . = LUM_FALLOFF(C, pixel_turf); \ . *= light_power; \ var/OLD = effect_str[C]; \ - \ effect_str[C] = .; \ \ C.update_lumcount \ @@ -126,7 +125,6 @@ (. * lum_b) - (OLD * applied_lum_b) \ ); - #define REMOVE_CORNER(C) \ . = -effect_str[C]; \ C.update_lumcount \ @@ -167,8 +165,9 @@ /datum/light_source/proc/update_corners() var/update = FALSE + var/atom/source_atom = src.source_atom - if (!source_atom || QDELETED(source_atom)) + if (QDELETED(source_atom)) qdel(src) return