diff --git a/code/datums/components/overlay_lighting.dm b/code/datums/components/overlay_lighting.dm index b6a812ce9a..8c4046c867 100644 --- a/code/datums/components/overlay_lighting.dm +++ b/code/datums/components/overlay_lighting.dm @@ -182,9 +182,12 @@ if(!current_holder) return var/atom/movable/light_source = GET_LIGHT_SOURCE + . = list() for(var/turf/lit_turf in view(lumcount_range, get_turf(light_source))) lit_turf.dynamic_lumcount += lum_power - LAZYADD(affected_turfs, lit_turf) + . += lit_turf + if(length(.)) + affected_turfs = . ///Clears the old affected turfs and populates the new ones. diff --git a/code/game/turfs/turf_changing.dm b/code/game/turfs/turf_changing.dm index 85292aa2b3..492f3ef65b 100644 --- a/code/game/turfs/turf_changing.dm +++ b/code/game/turfs/turf_changing.dm @@ -41,6 +41,7 @@ var/old_directional_opacity = directional_opacity var/old_outdoors = outdoors var/old_dangerous_objects = dangerous_objects + var/old_dynamic_lumcount = dynamic_lumcount var/turf/Ab = GetAbove(src) if(Ab) @@ -111,6 +112,8 @@ lighting_corner_SW = old_lighting_corner_SW lighting_corner_NW = old_lighting_corner_NW + dynamic_lumcount = old_dynamic_lumcount + if(SSlighting.subsystem_initialized) lighting_object = old_lighting_object