fix ascending through floors (#7912)

This commit is contained in:
Raeschen
2024-03-08 17:28:22 +01:00
committed by GitHub
parent 97edbcaac9
commit 9c4d1b8af0

View File

@@ -58,10 +58,15 @@
to_chat(src, "<span class='warning'>You stopped swimming downwards.</span>")
return 0
else if(!destination.CanZPass(src, direction))
else if(!destination.CanZPass(src, direction)) // one for the down and non-special case
to_chat(src, "<span class='warning'>\The [destination] blocks your way.</span>")
return 0
else if(!destination.CanZPass(src, direction)) // and one for up
to_chat(src, "<span class='warning'>\The [destination] blocks your way.</span>")
return 0
var/area/area = get_area(src)
if(area.has_gravity() && !can_overcome_gravity())
if(direction == UP)