mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-10 18:02:57 +00:00
fixin' a multiz segfault
This commit is contained in:
@@ -7,6 +7,20 @@
|
||||
return get_step(SSmapping.get_turf_below(get_turf(ref)), dir)
|
||||
return get_step(ref, dir)
|
||||
|
||||
/proc/get_multiz_accessible_levels(center_z)
|
||||
. = list(center_z)
|
||||
var/other_z = center_z
|
||||
var/offset
|
||||
while((offset = SSmapping.level_trait(other_z, ZTRAIT_DOWN)))
|
||||
other_z += offset
|
||||
. += other_z
|
||||
other_z = center_z
|
||||
while((offset = SSmapping.level_trait(other_z, ZTRAIT_UP)))
|
||||
other_z += offset
|
||||
. += other_z
|
||||
return .
|
||||
|
||||
|
||||
/proc/get_dir_multiz(turf/us, turf/them)
|
||||
us = get_turf(us)
|
||||
them = get_turf(them)
|
||||
@@ -38,10 +52,11 @@
|
||||
if((holder == NONE) || (holder == (UP|DOWN)))
|
||||
return turn(dir, 180)
|
||||
dir &= ~(UP|DOWN)
|
||||
dir = turn(dir, 180)
|
||||
if(dir != 0)
|
||||
dir = turn(dir, 180)
|
||||
if(holder == UP)
|
||||
holder = DOWN
|
||||
else
|
||||
holder = UP
|
||||
dir |= holder
|
||||
return dir
|
||||
return dir
|
||||
|
||||
Reference in New Issue
Block a user