Fixes platforms pulling people through railings (#20627)

There was an edge case where collisions were checking the platform first
before any other obstacles on the tile and platforms were pulling people
down to "hop down" through the railings or whatever. Fixes that.
Whoopsie.

---------

Signed-off-by: FlamingLily <80451102+FlamingLily@users.noreply.github.com>
Co-authored-by: Matt Atlas <mattiathebest2000@hotmail.it>
This commit is contained in:
FlamingLily
2025-03-22 07:22:40 +11:00
committed by GitHub
parent cfd52309da
commit 2be4928b32
2 changed files with 65 additions and 0 deletions
+7
View File
@@ -472,6 +472,13 @@
/obj/structure/platform/CollidedWith(atom/bumped_atom)
. = ..()
for(var/obj/other_obj in get_turf(src))
if(other_obj == src)
continue
if(other_obj.density)
return // Whatever other structure is blocking the hop-down effect.
if(get_dir(src, bumped_atom) == REVERSE_DIR(dir))
var/atom/movable/bumped_movable = bumped_atom
if(ismob(bumped_movable))