mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-20 20:37:34 +01:00
Adaptive lighting updates (#1679)
This PR simplifies the lighting update system (removes update_type) and instead makes the lighting system decide which update method to use based on server load. Instant updates are used during low-load, scheduled during high. Also removes: update_lights_now() (redundant), diff_light() (unused).
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
|
||||
/datum/controller/process/lighting/statProcess()
|
||||
..()
|
||||
stat(null, "Current server tick usage is [world.tick_usage], threshold is [TICK_LIMIT].")
|
||||
stat(null, "[all_lighting_overlays.len] overlays ([all_lighting_corners.len] corners)")
|
||||
stat(null, "Lights: [lighting_update_lights.len] queued, [curr_lights.len] processing")
|
||||
stat(null, "Corners: [lighting_update_corners.len] queued, [curr_corners.len] processing")
|
||||
@@ -43,7 +44,7 @@
|
||||
var/datum/light_source/L = curr_lights[curr_lights.len]
|
||||
curr_lights.len--
|
||||
|
||||
if(L.check() || L.destroyed || L.force_update)
|
||||
if(L.destroyed || L.check() || L.force_update)
|
||||
L.remove_lum()
|
||||
if(!L.destroyed)
|
||||
L.apply_lum()
|
||||
|
||||
Reference in New Issue
Block a user