Lighting: The sanicing

This commit is contained in:
PJB3005
2015-07-21 15:58:39 +02:00
parent 5b96d6c630
commit b6a1ee2adf
4 changed files with 99 additions and 39 deletions

View File

@@ -10,12 +10,17 @@
lighting_update_lights = list()
for(var/datum/light_source/L in lighting_update_lights_old)
if(L.needs_update)
if(L.destroyed || L.check() || L.force_update)
L.remove_lum()
if(!L.destroyed) L.apply_lum()
L.force_update = 0
L.needs_update = 0
if(L.destroyed || L.check() || L.force_update)
L.remove_lum()
if(!L.destroyed)
L.apply_lum()
else if(L.vis_update) //We smartly update only tiles that became (in) visible to use.
L.smart_vis_update()
L.vis_update = 0
L.force_update = 0
L.needs_update = 0
scheck()
@@ -24,8 +29,7 @@
lighting_update_overlays = list()
for(var/atom/movable/lighting_overlay/O in lighting_update_overlays_old)
if(O.needs_update)
O.update_overlay()
O.needs_update = 0
O.update_overlay()
O.needs_update = 0
scheck()