From 55a8331ef36310b1660e3a401960d2cb027e4dd6 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Mon, 26 Dec 2022 02:38:16 +0100 Subject: [PATCH] [MIRROR] Prevent atmos runtimes during shuttle move [MDB IGNORE] (#18341) * 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. * Prevent atmos runtimes during shuttle move Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com> --- 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 c5ac7edeca7..a9d09914936 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.