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.