From 0737add0fe068e971787afeb6090a5081a977533 Mon Sep 17 00:00:00 2001 From: z411 Date: Sun, 4 Oct 2020 17:06:30 -0300 Subject: [PATCH] Added shotgun melee impact sound --- qcsrc/common/sounds/all.inc | 1 + qcsrc/common/weapons/weapon/shotgun.qc | 1 + 2 files changed, 2 insertions(+) diff --git a/qcsrc/common/sounds/all.inc b/qcsrc/common/sounds/all.inc index 55e1da882..8e90cd799 100644 --- a/qcsrc/common/sounds/all.inc +++ b/qcsrc/common/sounds/all.inc @@ -96,6 +96,7 @@ SOUND(SEEKEREXP3, W_Sound("seekerexp3")); SOUND(SEEKER_FIRE, W_Sound("seeker_fire")); SOUND(SHOTGUN_FIRE, W_Sound("shotgun_fire")); SOUND(SHOTGUN_MELEE, W_Sound("shotgun_melee")); +SOUND(SHOTGUN_MELEE_IMPACT, W_Sound("shotgun_melee_impact")); SOUND(STRENGTH_FIRE, W_Sound("strength_fire")); SOUND(TAGEXP1, W_Sound("tagexp1")); SOUND(TAGEXP2, W_Sound("tagexp2")); diff --git a/qcsrc/common/weapons/weapon/shotgun.qc b/qcsrc/common/weapons/weapon/shotgun.qc index dcde58a30..1bc18846e 100644 --- a/qcsrc/common/weapons/weapon/shotgun.qc +++ b/qcsrc/common/weapons/weapon/shotgun.qc @@ -105,6 +105,7 @@ void W_Shotgun_Melee_Think(entity this) //print(strcat(this.realowner.netname, " hitting ", target_victim.netname, " with ", strcat(ftos(swing_damage), " damage (factor: ", ftos(swing_factor), ") at "), ftos(time), " seconds.\n")); + sound(target_victim, CH_SHOTS, SND_SHOTGUN_MELEE_IMPACT, VOL_BASE, ATTEN_NORM); Damage(target_victim, this.realowner, this.realowner, swing_damage, WEP_SHOTGUN.m_id | HITTYPE_SECONDARY, this.weaponentity_fld, this.realowner.origin + this.realowner.view_ofs, -- 2.39.2