From 19035c445025c772fc29d81f9bfe632b790f51e7 Mon Sep 17 00:00:00 2001 From: deathride58 Date: Fri, 22 Feb 2019 09:01:48 -0500 Subject: [PATCH] fixes zooming guns being plausible even if you aren't holding the gun in any of your hands (#8012) --- code/modules/projectiles/gun.dm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index 701e92527b..ae6e309507 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -477,8 +477,12 @@ /datum/action/toggle_scope_zoom/IsAvailable() . = ..() - if(!. && gun) + if(!gun) + return FALSE + if(!.) gun.zoom(owner, FALSE) + if(!owner.get_held_index_of_item(gun)) + return FALSE /datum/action/toggle_scope_zoom/Remove(mob/living/L) gun.zoom(L, FALSE)