Lighting optimizations.

Less lists, more optimized for() loops, more turf ref usage, better turf ref handling when the resolution is 1, pooling for lighting overlays
This commit is contained in:
PJB3005
2015-06-07 22:32:36 +02:00
parent 7f3c0f88b1
commit 9eaa5b6c76
14 changed files with 151 additions and 59 deletions

View File

@@ -7,11 +7,10 @@
/datum/controller/process/lighting/doWork()
for(var/datum/light_source/L in lighting_update_lights)
if(L.needs_update)
if(L.destroyed)
if(L.destroyed || L.check() || L.force_update)
L.remove_lum()
else if(L.check() || L.force_update)
L.remove_lum()
L.apply_lum()
if(!L.destroyed)
L.apply_lum()
L.force_update = 0
L.needs_update = 0