From b260d511fb1556dbfbfed18befa5b859f5caf2c5 Mon Sep 17 00:00:00 2001 From: Ccomp5950 Date: Wed, 22 Jan 2014 23:40:32 -0600 Subject: [PATCH] Gun fixes. You die, you are zoomed out You have welding equipment on, you can't zoom in. --- code/modules/mob/living/carbon/human/life.dm | 7 +++++++ code/modules/projectiles/guns/energy/special.dm | 3 +++ 2 files changed, 10 insertions(+) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 6a143c4dc6b..b2a2180eadc 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -1192,6 +1192,13 @@ see_in_dark = 8 if(!druggy) see_invisible = SEE_INVISIBLE_LEVEL_TWO if(healths) healths.icon_state = "health7" //DEAD healthmeter + if(client) + if(client.view != world.view) + if(locate(/obj/item/weapon/gun/energy/sniperrifle, contents)) + var/obj/item/weapon/gun/energy/sniperrifle/s = locate() in src + if(s.zoom) + s.zoom() + else sight &= ~(SEE_TURFS|SEE_MOBS|SEE_OBJS) see_in_dark = species.darksight diff --git a/code/modules/projectiles/guns/energy/special.dm b/code/modules/projectiles/guns/energy/special.dm index e6b0f37739d..eb8515fb4ac 100644 --- a/code/modules/projectiles/guns/energy/special.dm +++ b/code/modules/projectiles/guns/energy/special.dm @@ -228,6 +228,9 @@ obj/item/weapon/gun/energy/staff/focus if(usr.stat || !(istype(usr,/mob/living/carbon/human))) usr << "You are unable to focus down the scope of the rifle." return + if(!zoom && global_hud.darkMask[1] in usr.client.screen) + usr << "Your welding equipment gets in the way of you looking down the scope" + return if(!zoom && usr.get_active_hand() != src) usr << "You are too distracted to look down the scope, perhaps if it was in your active hand this might work better" return