From cc9330a2ec6c78f992a3851fe374c5cc1c9b4d56 Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Wed, 26 Jul 2017 15:44:54 -0500 Subject: [PATCH] Fixes guns staying zoomed in after being unequipped --- code/modules/projectiles/gun.dm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index 5a21c92f79..115618f0b9 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -91,6 +91,11 @@ else to_chat(user, "It doesn't have a firing pin installed, and won't fire.") +/obj/item/weapon/gun/equipped(mob/living/user, slot) + . = ..() + if(zoomable && user.get_active_held_item() != src) + zoom(user, FALSE) //we can only stay zoomed in if it's in our hands + //called after the gun has successfully fired its chambered ammo. /obj/item/weapon/gun/proc/process_chamber() return 0