mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 18:32:03 +00:00
This reverts commit 07e41392ef.
This commit is contained in:
@@ -25,8 +25,12 @@
|
||||
/proc/GetConnectedZlevels(z)
|
||||
. = list(z)
|
||||
for(var/level = z, HasBelow(level), level = map.zLevels[level].z_below)
|
||||
if((level != z) && (level in .)) // No infinite loops
|
||||
break
|
||||
. |= level
|
||||
for(var/level = z, HasAbove(level), level = map.zLevels[level].z_above)
|
||||
if((level != z) && (level in .)) // No infinite loops
|
||||
break
|
||||
. |= level
|
||||
|
||||
/proc/AreConnectedZLevels(var/zA, var/zB)
|
||||
@@ -38,8 +42,12 @@
|
||||
return list()
|
||||
. = list(turf.z)
|
||||
for(var/level = turf.z, HasBelow(level) && isvisiblespace(GetBelow(locate(turf.x,turf.y,level))), level = map.zLevels[level].z_below)
|
||||
if((level != turf.z) && (level in .)) // No infinite loops
|
||||
break
|
||||
. |= level
|
||||
for(var/level = turf.z, HasAbove(level) && isvisiblespace(GetAbove(locate(turf.x,turf.y,level))), level = map.zLevels[level].z_above)
|
||||
if((level != turf.z) && (level in .)) // No infinite loops
|
||||
break
|
||||
. |= level
|
||||
|
||||
/proc/AreOpenConnectedZLevels(var/zA, var/zB)
|
||||
|
||||
@@ -31,7 +31,11 @@
|
||||
return
|
||||
|
||||
var/turf/bottom = null
|
||||
var/depth = 0
|
||||
for(bottom = GetBelow(src); isopenspace(bottom); bottom = GetBelow(bottom))
|
||||
depth++
|
||||
if(depth > config.multiz_bottom_cap) // To stop getting caught on this in infinite loops
|
||||
break
|
||||
|
||||
if(istype(bottom,/turf/space))
|
||||
return
|
||||
@@ -64,7 +68,11 @@
|
||||
return
|
||||
|
||||
bottom = null
|
||||
depth = 0
|
||||
for(bottom = GetBelow(src); isopenspace(bottom); bottom = GetBelow(bottom))
|
||||
depth++
|
||||
if(depth > config.multiz_bottom_cap) // To stop getting caught on this in infinite loops
|
||||
break
|
||||
|
||||
if(istype(bottom,/turf/space))
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user