From 2ab05d1247a516549190f5c83e6ea093add02a1b Mon Sep 17 00:00:00 2001 From: Putnam Date: Sun, 30 May 2021 00:31:20 -0700 Subject: [PATCH 1/2] makes sniper zooming work --- code/modules/projectiles/gun.dm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index 63d019f97f..5307b0c806 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -569,11 +569,16 @@ . = ..() if(!.) var/obj/item/gun/G = target + G.zoom(owner, owner.dir, FALSE) + +/datum/action/item_action/toggle_scope_zoom/Trigger() + . = ..() + if(.) G.zoom(owner, owner.dir) /datum/action/item_action/toggle_scope_zoom/Remove(mob/living/L) var/obj/item/gun/G = target - G.zoom(L, L.dir) + G.zoom(L, L.dir, FALSE) return ..() /obj/item/gun/proc/rotate(atom/thing, old_dir, new_dir) From 9040c08698eaaebe345e6cd4ed838e5f94216fd8 Mon Sep 17 00:00:00 2001 From: Putnam Date: Sun, 30 May 2021 00:38:07 -0700 Subject: [PATCH 2/2] whoops i forgot the var --- code/modules/projectiles/gun.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index 5307b0c806..06bf298454 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -574,6 +574,7 @@ /datum/action/item_action/toggle_scope_zoom/Trigger() . = ..() if(.) + var/obj/item/gun/G = target G.zoom(owner, owner.dir) /datum/action/item_action/toggle_scope_zoom/Remove(mob/living/L)