Potentially fix light/atmos lag. (#16379)

* Potentially fix light/atmos lag.

* oops

* 2

* 3

* ff

* br

---------

Co-authored-by: Matt Atlas <liermattia@gmail.com>
This commit is contained in:
Matt Atlas
2023-05-30 16:15:34 +00:00
committed by GitHub
co-authored by Matt Atlas
parent 25f1c21fb4
commit 4e39aa496f
3 changed files with 10 additions and 5 deletions
+2 -2
View File
@@ -5,9 +5,9 @@
/turf/var/datum/gas_mixture/air
/turf/simulated/proc/update_graphic(list/graphic_add = null, list/graphic_remove = null)
if (LAZYLEN(graphic_add))
if(graphic_add && LAZYLEN(graphic_add))
vis_contents += graphic_add
if(LAZYLEN(graphic_remove))
if(graphic_remove && LAZYLEN(graphic_remove))
vis_contents -= graphic_remove
/turf/proc/update_air_properties()
+4
View File
@@ -153,11 +153,15 @@ Class Procs:
if(istype(T))
T.create_fire(vsc.fire_firelevel_multiplier)
var/world_time_counter = world.time
var/list/graphic_add = list()
var/list/graphic_remove = list()
if(air.check_tile_graphic(graphic_add, graphic_remove))
for(var/turf/simulated/T in contents)
T.update_graphic(graphic_add, graphic_remove)
var/delta_time = world.time - world_time_counter
if(delta_time > 5 SECONDS)
log_admin("AN AREA IS TAKING EXTREMELY LONG TO UPDATE: [name] WITH CONTENTS LENGTH [length(contents)] TELL MATT WITH THE ROUND ID!")
for(var/connection_edge/E in edges)
if(E.sleeping)