mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-26 13:39:16 +01:00
fix multizmovement (#16702)
This commit is contained in:
@@ -115,11 +115,10 @@
|
||||
to_chat(src, span_warning("You gave up on pulling yourself up."))
|
||||
return 0
|
||||
|
||||
//RS Port #661 Start, Prevents noclipping
|
||||
else if(!istype(destination, /turf/simulated/open))
|
||||
// Explicit check if the destination turf allows full passing
|
||||
else if(!destination.CanZPass(src, direction))
|
||||
to_chat(src, span_warning("Something solid above stops you from passing."))
|
||||
return 0
|
||||
//RS Port #661 End
|
||||
|
||||
else if(isliving(src)) //VOREStation Edit Start. Are they a mob, and are they currently flying??
|
||||
var/mob/living/H = src
|
||||
|
||||
@@ -1,20 +1,23 @@
|
||||
/// Multiz support override for CanZPass
|
||||
/turf/proc/CanZPass(atom/A, direction)
|
||||
/turf/proc/CanZPass(atom/A, direction, recursive = FALSE)
|
||||
if(recursive)
|
||||
return FALSE
|
||||
if(z == A.z) //moving FROM this turf
|
||||
return direction == UP //can't go below
|
||||
else
|
||||
if(direction == UP) //on a turf below, trying to enter
|
||||
return 0
|
||||
return FALSE
|
||||
if(direction == DOWN) //on a turf above, trying to enter
|
||||
return !density && isopenspace(GetAbove(src)) // VOREStation Edit
|
||||
var/turf/above = GetAbove(src)
|
||||
return !density && above?.CanZPass(A, direction, TRUE) // do not call the function again, only accept overrides that return TRUE for a direction
|
||||
|
||||
/// Multiz support override for CanZPass
|
||||
/turf/simulated/open/CanZPass(atom, direction)
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/// Multiz support override for CanZPass
|
||||
/turf/space/CanZPass(atom, direction)
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/// WARNING WARNING
|
||||
/// Turfs DO NOT lose their signals when they get replaced, REMEMBER THIS
|
||||
|
||||
Reference in New Issue
Block a user