From b016998e3e5e3f2cef1a80fdb98f56b402d00a3c Mon Sep 17 00:00:00 2001 From: AnturK Date: Fri, 19 May 2017 17:50:38 +0200 Subject: [PATCH] Fixes buttons under doors. --- code/_onclick/click.dm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index f178b83656a..d37ff5ef516 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -148,7 +148,9 @@ /atom/proc/IsObscured() if(!isturf(loc)) //This only makes sense for things directly on turfs for now return FALSE - var/turf/T = loc + var/turf/T = get_turf_pixel(src) + if(!T) + return FALSE for(var/atom/movable/AM in T) if(AM.flags & PREVENT_CLICK_UNDER && AM.density && AM.layer > layer) return TRUE