diff --git a/code/modules/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm
index fde3978b1a3..cef12ff2e63 100644
--- a/code/modules/projectiles/projectile.dm
+++ b/code/modules/projectiles/projectile.dm
@@ -18,6 +18,7 @@
anchored = 1 //There's a reason this is here, Mport. God fucking damn it -Agouri. Find&Fix by Pete. The reason this is here is to stop the curving of emitter shots.
pass_flags = PASSTABLE
mouse_opacity = 0
+ hitsound = 'sound/weapons/pierce.ogg'
var/bumped = 0 //Prevents it from hitting more than one guy at once
var/def_zone = "" //Aiming at
var/mob/firer = null//Who shot it
@@ -59,8 +60,14 @@
var/mob/living/L = target
return L.apply_effects(stun, weaken, paralyze, irradiate, stutter, eyeblur, drowsy, blocked)
+ proc/vol_by_damage()
+ if(src.damage)
+ return Clamp((src.damage) * 2, 30, 100)// Multiply projectile damage by 2, then clamp the value between 30 and 100
+ else
+ return 40 //if the projectile doesn't do damage, play its hitsound at 40% volume
Bump(atom/A as mob|obj|turf|area)
+
if(A == firer)
loc = A.loc
return 0 //cannot shoot yourself
@@ -83,8 +90,11 @@
var/distance = get_dist(get_turf(A), starting) // Get the distance between the turf shot from and the mob we hit and use that for the calculations.
def_zone = ran_zone(def_zone, max(100-(7*distance), 5)) //Lower accurancy/longer range tradeoff. 7 is a balanced number to use.
if(silenced)
+ playsound(loc, hitsound, 5, 1, -1)
M << "You've been shot in the [parse_zone(def_zone)] by [src]!"
else
+ var/volume = vol_by_damage()
+ playsound(loc, hitsound, volume, 1, -1)
M.visible_message("[M] is hit by [src] in the [parse_zone(def_zone)]!", \
"[M] is hit by [src] in the [parse_zone(def_zone)]!") //X has fired Y is now given by the guns so you cant tell who shot you if you could not see the shooter
add_logs(firer, M, "shot", object="[src]", addition=reagent_note)
diff --git a/code/modules/projectiles/projectile/beams.dm b/code/modules/projectiles/projectile/beams.dm
index 061660d27cd..4bda18157a1 100644
--- a/code/modules/projectiles/projectile/beams.dm
+++ b/code/modules/projectiles/projectile/beams.dm
@@ -4,6 +4,7 @@
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE
damage = 20
damage_type = BURN
+ hitsound = 'sound/weapons/sear.ogg'
flag = "laser"
eyeblur = 2
@@ -12,6 +13,7 @@
icon_state = "laser"
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE
damage = 0
+ hitsound = null
damage_type = BURN
flag = "laser"
eyeblur = 2
@@ -58,6 +60,7 @@
/obj/item/projectile/bluetag
name = "lasertag beam"
icon_state = "bluelaser"
+ hitsound = null
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE
damage = 0
damage_type = BURN
@@ -73,6 +76,7 @@
/obj/item/projectile/redtag
name = "lasertag beam"
icon_state = "laser"
+ hitsound = null
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE
damage = 0
damage_type = BURN
@@ -87,6 +91,7 @@
/obj/item/projectile/omnitag//A laser tag bolt that stuns EVERYONE
name = "lasertag beam"
+ hitsound = null
icon_state = "omnilaser"
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE
damage = 0
diff --git a/code/modules/projectiles/projectile/energy.dm b/code/modules/projectiles/projectile/energy.dm
index 2e3e61c032a..2a8551c9351 100644
--- a/code/modules/projectiles/projectile/energy.dm
+++ b/code/modules/projectiles/projectile/energy.dm
@@ -13,6 +13,7 @@
stun = 10
weaken = 10
stutter = 10
+ hitsound = "sparks"
on_hit(var/atom/target, var/blocked = 0)
if(!ismob(target) || blocked >= 2) //Fully blocked by mob or collided with dense object - burst into sparks!
diff --git a/sound/weapons/sear.ogg b/sound/weapons/sear.ogg
new file mode 100644
index 00000000000..c6d5f6846c9
Binary files /dev/null and b/sound/weapons/sear.ogg differ