fix an issue with destroying light sources that have 0 light_range

Signed-off-by: Mloc <colmohici@gmail.com>
This commit is contained in:
Mloc
2015-05-14 10:58:52 +01:00
parent 9ed8f69e02
commit d6f4828f2a
2 changed files with 4 additions and 6 deletions

View File

@@ -7,11 +7,9 @@
/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