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
+4 -3
View File
@@ -359,16 +359,17 @@
else
//Overlay isn't applied for this gas, check if it's valid and needs to be added.
if(gas[g] > gas_data.overlay_limit[g])
LAZYADD(graphic_add, gas_data.tile_overlay[g])
if(!(gas_data.tile_overlay[g] in graphic))
LAZYADD(graphic_add, gas_data.tile_overlay[g])
. = 0
//Apply changes
if(LAZYLEN(graphic_add))
if(graphic_add && LAZYLEN(graphic_add))
LAZYINITLIST(graphic)
for (var/entry in graphic_add)
graphic[entry] = TRUE // This is an assoc list to make checking it a bit faster.
. = 1
if(LAZYLEN(graphic_remove))
if(graphic_add && LAZYLEN(graphic_remove))
graphic -= graphic_remove
. = 1