mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 02:09:41 +00:00
Merge pull request #2621 from CHOMPStationBot/upstream-merge-11165
[MIRROR] Small light optimizations
This commit is contained in:
@@ -182,9 +182,12 @@
|
|||||||
if(!current_holder)
|
if(!current_holder)
|
||||||
return
|
return
|
||||||
var/atom/movable/light_source = GET_LIGHT_SOURCE
|
var/atom/movable/light_source = GET_LIGHT_SOURCE
|
||||||
|
. = list()
|
||||||
for(var/turf/lit_turf in view(lumcount_range, get_turf(light_source)))
|
for(var/turf/lit_turf in view(lumcount_range, get_turf(light_source)))
|
||||||
lit_turf.dynamic_lumcount += lum_power
|
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.
|
///Clears the old affected turfs and populates the new ones.
|
||||||
|
|||||||
@@ -41,6 +41,7 @@
|
|||||||
var/old_directional_opacity = directional_opacity
|
var/old_directional_opacity = directional_opacity
|
||||||
var/old_outdoors = outdoors
|
var/old_outdoors = outdoors
|
||||||
var/old_dangerous_objects = dangerous_objects
|
var/old_dangerous_objects = dangerous_objects
|
||||||
|
var/old_dynamic_lumcount = dynamic_lumcount
|
||||||
|
|
||||||
var/turf/Ab = GetAbove(src)
|
var/turf/Ab = GetAbove(src)
|
||||||
if(Ab)
|
if(Ab)
|
||||||
@@ -111,6 +112,8 @@
|
|||||||
lighting_corner_SW = old_lighting_corner_SW
|
lighting_corner_SW = old_lighting_corner_SW
|
||||||
lighting_corner_NW = old_lighting_corner_NW
|
lighting_corner_NW = old_lighting_corner_NW
|
||||||
|
|
||||||
|
dynamic_lumcount = old_dynamic_lumcount
|
||||||
|
|
||||||
if(SSlighting.subsystem_initialized)
|
if(SSlighting.subsystem_initialized)
|
||||||
lighting_object = old_lighting_object
|
lighting_object = old_lighting_object
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user