diff --git a/code/game/objects/items/weapons/grenades/flashbang.dm b/code/game/objects/items/weapons/grenades/flashbang.dm index 4024e5275e9..2716719fda3 100644 --- a/code/game/objects/items/weapons/grenades/flashbang.dm +++ b/code/game/objects/items/weapons/grenades/flashbang.dm @@ -7,19 +7,21 @@ prime() ..() - for(var/obj/structure/closet/L in view(get_turf(src), null)) + for(var/obj/structure/closet/L in hear(7, get_turf(src))) if(locate(/mob/living/carbon/, L)) for(var/mob/living/carbon/M in L) bang(get_turf(src), M) - for(var/mob/living/carbon/M in viewers(get_turf(src), null)) + for(var/mob/living/carbon/M in hear(7, get_turf(src))) bang(get_turf(src), M) - for(var/obj/effect/blob/B in view(8,get_turf(src))) //Blob damage here + for(var/obj/effect/blob/B in hear(8,get_turf(src))) //Blob damage here var/damage = round(30/(get_dist(B,get_turf(src))+1)) B.health -= damage B.update_icon() + + new/obj/effect/effect/smoke/flashbang(src.loc) del(src) return @@ -30,7 +32,7 @@ S.icon_state = "shield0" M << "\red BANG" - playsound(src.loc, 'sound/effects/bang.ogg', 25, 1) + playsound(src.loc, 'sound/effects/bang.ogg', 50, 1, 5) //Checking for protections var/eye_safety = 0 @@ -98,6 +100,15 @@ M << "\red Your ears start to ring!" M.update_icons() +/obj/effect/effect/smoke/flashbang + name = "illumination" + time_to_live = 10 + opacity = 0 + icon_state = "sparks" + +/obj/effect/effect/smoke/flashbang/New() + ..() + SetLuminosity(15) /obj/item/weapon/grenade/flashbang/clusterbang//Created by Polymorph, fixed by Sieve desc = "Use of this weapon may constiute a war crime in your area, consult your local captain."