From 46ef0a8949933425339efee76409cbac5cea9ddc Mon Sep 17 00:00:00 2001 From: mwerezak Date: Mon, 16 Feb 2015 20:28:18 -0500 Subject: [PATCH] Fixes accuracy not being reset when unzoomed --- code/modules/projectiles/gun.dm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index c2d6266473..c03df810de 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -258,6 +258,10 @@ accuracy = scoped_accuracy + scoped_accuracy_mod if(recoil) recoil = round(recoil*zoom_amount+1) //recoil is worse when looking through a scope - else - accuracy = (accuracy) + +//make sure accuracy and recoil are reset regardless of how the item is unzoomed. +/obj/item/weapon/gun/zoom() + ..() + if(!zoom) + accuracy = initial(accuracy) recoil = initial(recoil)