mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2025-12-26 10:12:17 +00:00
Lighting performance/profiling tweaks
- Lighting process now yields at 10% of a tick and defers at 80% of a tick - There is no longer a limit to how many sources/corners/overlays will update in a single work run - Source/corner/overlay totals are now simple counts instead of lists - Lighting update stats now show updates over each of the previous 5 seconds - Space turfs now remove their starlight when changing to a different turf, fixing a runtime
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/var/list/datum/light_source/all_lighting_sources = list()
|
||||
/var/total_lighting_sources = 0
|
||||
// This is where the fun begins.
|
||||
// These are the main datums that emit light.
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
var/force_update
|
||||
|
||||
/datum/light_source/New(var/atom/owner, var/atom/top)
|
||||
all_lighting_sources += src
|
||||
total_lighting_sources++
|
||||
source_atom = owner // Set our new owner.
|
||||
if(!source_atom.light_sources)
|
||||
source_atom.light_sources = list()
|
||||
@@ -62,7 +62,7 @@
|
||||
|
||||
// Kill ourselves.
|
||||
/datum/light_source/proc/destroy()
|
||||
all_lighting_sources -= src
|
||||
total_lighting_sources--
|
||||
destroyed = TRUE
|
||||
force_update()
|
||||
if(source_atom)
|
||||
|
||||
Reference in New Issue
Block a user