From 4160488ed18ce1b68c9c42938d523a6b49a1940e Mon Sep 17 00:00:00 2001 From: Mloc-Argent Date: Sun, 28 Sep 2014 16:44:20 +0100 Subject: [PATCH] fix gas overlays persisting after rebuilds slight visual artifact when zones are rebuilt, overlays will be missing until the end of the current tick. otherwise works fine. Signed-off-by: Mloc-Argent --- code/ZAS/Turf.dm | 4 ++-- code/ZAS/Zone.dm | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/code/ZAS/Turf.dm b/code/ZAS/Turf.dm index e3a28fe3d4..9d031ce3d3 100644 --- a/code/ZAS/Turf.dm +++ b/code/ZAS/Turf.dm @@ -5,9 +5,9 @@ /turf/var/datum/gas_mixture/air /turf/simulated/proc/update_graphic(list/graphic_add = null, list/graphic_remove = null) - if(graphic_add) + if(graphic_add && graphic_add.len) overlays += graphic_add - if(graphic_remove) + if(graphic_remove && graphic_remove.len) overlays -= graphic_remove /turf/proc/update_air_properties() diff --git a/code/ZAS/Zone.dm b/code/ZAS/Zone.dm index e794c36b02..1f2cbee8d3 100644 --- a/code/ZAS/Zone.dm +++ b/code/ZAS/Zone.dm @@ -118,6 +118,7 @@ Class Procs: if(invalid) return //Short circuit for explosions where rebuild is called many times over. c_invalidate() for(var/turf/simulated/T in contents) + T.update_graphic(graphic_remove = air.graphic) //we need to remove the overlays so they're not doubled when the zone is rebuilt //T.dbg(invalid_zone) T.needs_air_update = 0 //Reset the marker so that it will be added to the list. air_master.mark_for_update(T)