From 92d143e4ab42c86231d783ccc4ec5d6ca0927789 Mon Sep 17 00:00:00 2001 From: joep van der velden Date: Mon, 15 Jun 2020 07:36:31 +0200 Subject: [PATCH] small optimization --- code/game/objects/items/shooting_range.dm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/code/game/objects/items/shooting_range.dm b/code/game/objects/items/shooting_range.dm index bffb9e449f7..41b546a0b52 100644 --- a/code/game/objects/items/shooting_range.dm +++ b/code/game/objects/items/shooting_range.dm @@ -85,8 +85,7 @@ var/decaltype = DECALTYPE_SCORCH if(istype(P, /obj/item/projectile/bullet)) decaltype = DECALTYPE_BULLET - var/icon/C = icon(icon, icon_state) - if(C.GetPixel(p_x, p_y) && LAZYLEN(overlays) <= 35) // if the located pixel isn't blank (null) + if(LAZYLEN(overlays) <= 35 && icon(icon, icon_state).GetPixel(p_x, p_y)) // if the located pixel isn't blank (null) hp -= P.damage if(hp <= 0) visible_message("[src] breaks into tiny pieces and collapses!")