From 37ec46f89e84e5f4fbb962e0f42040b2575a1a94 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Tue, 2 Feb 2021 20:04:49 +0100 Subject: [PATCH] [MIRROR] fixes is_blocked_turf from not working (#3028) * fixes is_blocked_turf from not working (#56512) * usa * Update code/game/turfs/turf.dm Co-authored-by: AnturK Co-authored-by: AnturK * fixes is_blocked_turf from not working Co-authored-by: Tlaltecuhtli <33834933+Tlaltecuhtli@users.noreply.github.com> Co-authored-by: AnturK --- code/game/turfs/turf.dm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index 1ee3b315fcb..6986e35980f 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -189,11 +189,12 @@ GLOBAL_LIST_EMPTY(station_turfs) // We don't want to block ourselves or consider any ignored atoms. if((content == source_atom) || (content in ignore_atoms)) continue - var/atom/atom_content = content // If the thing is dense AND we're including mobs or the thing isn't a mob AND if there's a source atom and - // it cannot pass through the thing on the turf, we consider the turf blocked. - if(atom_content.density && (!exclude_mobs || !ismob(atom_content)) && (source_atom && !atom_content.CanPass(source_atom, src))) + // it cannot pass through the thing on the turf, we consider the turf blocked. + if(atom_content.density && (!exclude_mobs || !ismob(atom_content))) + if(source_atom && atom_content.CanPass(source_atom, src)) + continue return TRUE return FALSE