From 06a9beb6a681619931e047c0e40c413f454bf226 Mon Sep 17 00:00:00 2001 From: Zephyr <12817816+ZephyrTFA@users.noreply.github.com> Date: Sun, 25 Dec 2022 20:13:07 -0500 Subject: [PATCH] Prevent atmos runtimes during shuttle move (#72058) During shuttle move we iterate over border turfs to clear their excited state and active groups, but we never actually cleared it from the opposite direction so the turfs bordering the border would still try to process with the border turfs and would then runtime. --- code/modules/mapping/map_template.dm | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/code/modules/mapping/map_template.dm b/code/modules/mapping/map_template.dm index f9909f6a996..359cf932fb0 100644 --- a/code/modules/mapping/map_template.dm +++ b/code/modules/mapping/map_template.dm @@ -159,10 +159,13 @@ var/list/border = block(locate(max(T.x-1, 1), max(T.y-1, 1), T.z), locate(min(T.x+width+1, world.maxx), min(T.y+height+1, world.maxy), T.z)) - for(var/L in border) - var/turf/turf_to_disable = L - SSair.remove_from_active(turf_to_disable) //stop processing turfs along the border to prevent runtimes, we return it in initTemplateBounds() - turf_to_disable.atmos_adjacent_turfs?.Cut() + + // iterate over turfs in the border and clear them from active atmos processing + for(var/turf/border_turf as anything in border) + SSair.remove_from_active(border_turf) + for(var/turf/sub_turf as anything in border_turf.atmos_adjacent_turfs) + sub_turf.atmos_adjacent_turfs?.Remove(border_turf) + border_turf.atmos_adjacent_turfs?.Cut() // Accept cached maps, but don't save them automatically - we don't want // ruins clogging up memory for the whole round.