diff --git a/code/ZAS/Connection.dm b/code/ZAS/Connection.dm index c6a96ca6e4d..01f5351f595 100644 --- a/code/ZAS/Connection.dm +++ b/code/ZAS/Connection.dm @@ -196,8 +196,14 @@ connection del src if(A.zone == zone_B && B.zone == zone_A) - del src - + var/turf/temp = B + B = A + A = temp + zone_B = B.zone + zone_A = A.zone + var/temp_ref = ref_A + ref_A = ref_B + ref_B = temp_ref return if(zone_A) diff --git a/code/ZAS/FEA_turf_tile.dm b/code/ZAS/FEA_turf_tile.dm index cb9d780310c..275f0c5e935 100644 --- a/code/ZAS/FEA_turf_tile.dm +++ b/code/ZAS/FEA_turf_tile.dm @@ -203,7 +203,13 @@ turf var/turf/simulated/T = get_step(src,direction) if(air_check_directions&direction) //I can connect air in this direction if(!istype(T)) //Space - if(zone) + if(!CanPass(null, T, 1.5, 1) && CanPass(src, T, 0, 0)) //Normally would block it, instead lets make a connection to it. + if(zone) + zone.AddSpace(T) + else if(!CanPass(src, T, 0, 0)) //I block the air, disconnect from it if connected. + if(zone && T in zone.space_tiles) + zone.RemoveSpace(T) + else if(zone) zone.rebuild = 1 continue else if(!T.CanPass(null, src, 1.5, 1) && !T.CanPass(null, src, 0, 0)) //If I block air, we must look to see if the adjacent turfs need rebuilt.