From ebf38a6dcbd083010c2dbadf2464ee20fd29b5c3 Mon Sep 17 00:00:00 2001 From: n3ophyt3 Date: Sun, 3 Apr 2011 15:05:04 +0000 Subject: [PATCH] Minor fix on Aug's fixing of that compile warning (which was the third commit to fix it, apparently people don't like warnings in their compiles, even if it doesn't interfere with anything). Was half tempted to leave the bug in, but I doubt anyone would find it funny that you'd only be able to melee people with the detective's revolver if they were dressed up as a detective (as opposed to YOU being dressed up as the detective). git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1356 316c924e-a436-60f5-8080-3fe189b3f50e --- code/game/objects/items/weapons/guns_ammo.dm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/code/game/objects/items/weapons/guns_ammo.dm b/code/game/objects/items/weapons/guns_ammo.dm index c1f148c3f2a..94b1c7b2762 100644 --- a/code/game/objects/items/weapons/guns_ammo.dm +++ b/code/game/objects/items/weapons/guns_ammo.dm @@ -488,8 +488,12 @@ obj/item/weapon/gun/revolver/attackby(obj/item/weapon/ammo/a357/A as obj, mob/us /obj/item/weapon/gun/detectiverevolver/attack(mob/M as mob, mob/user as mob) src.add_fingerprint(user) -// var/mob/living/carbon/human/H = M - var/detective = (istype(H.w_uniform, /obj/item/clothing/under/det) && istype(H.head, /obj/item/clothing/head/det_hat) && istype(H.wear_suit, /obj/item/clothing/suit/det_suit)) + var/mob/living/carbon/human/H = user + var/detective + if(!istype(H)) + detective = 0 + else + detective = (istype(H.w_uniform, /obj/item/clothing/under/det) && istype(H.head, /obj/item/clothing/head/det_hat) && istype(H.wear_suit, /obj/item/clothing/suit/det_suit)) // ******* Check