[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 <AnturK@ users.noreply.github.com>

Co-authored-by: AnturK <AnturK@ users.noreply.github.com>

* fixes is_blocked_turf from not working

Co-authored-by: Tlaltecuhtli <33834933+Tlaltecuhtli@users.noreply.github.com>
Co-authored-by: AnturK <AnturK@ users.noreply.github.com>
This commit is contained in:
SkyratBot
2021-02-02 19:04:49 +00:00
committed by GitHub
co-authored by AnturK Tlaltecuhtli
parent 31a01ba333
commit 37ec46f89e
+4 -3
View File
@@ -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