Merge pull request #38605 from vuonojenmustaturska/tinylight

Micro-optimization to update_corners()
This commit is contained in:
Jordan Brown
2018-06-20 10:24:04 -04:00
committed by letterjay
parent 49a34614cd
commit 05995f5774
+4 -5
View File
@@ -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