From c56a8feebd15bf0eab313dbf6ac9afbde1c71dd6 Mon Sep 17 00:00:00 2001 From: z411 Date: Wed, 28 Jul 2021 19:06:25 -0400 Subject: [PATCH] Add additional sound if we hit in the air with the vortex with maximum damage --- qcsrc/common/sounds/all.inc | 2 ++ qcsrc/common/weapons/weapon/vortex.qc | 3 +++ 2 files changed, 5 insertions(+) diff --git a/qcsrc/common/sounds/all.inc b/qcsrc/common/sounds/all.inc index f296df93a..d1d9ad318 100644 --- a/qcsrc/common/sounds/all.inc +++ b/qcsrc/common/sounds/all.inc @@ -280,6 +280,8 @@ SOUND(ENDMATCH, "misc/endmatch"); SOUND(OVERTIME, "misc/overtime"); SOUND(TIMEOUT, "misc/timeout"); +SOUND(MIDAIR, "misc/midair"); + SOUND(SPAWN, "misc/spawn"); SOUND(TALK, "misc/talk"); diff --git a/qcsrc/common/weapons/weapon/vortex.qc b/qcsrc/common/weapons/weapon/vortex.qc index 32026c9ef..cea974854 100644 --- a/qcsrc/common/weapons/weapon/vortex.qc +++ b/qcsrc/common/weapons/weapon/vortex.qc @@ -142,6 +142,9 @@ void W_Vortex_Attack(Weapon thiswep, entity actor, .entity weaponentity, float i FireRailgunBullet(actor, weaponentity, w_shotorg, w_shotorg + w_shotdir * max_shot_distance, mydmg, false, myforce, mymindist, mymaxdist, myhalflife, myforcehalflife, dtype); if(yoda && flying) { + if(charge == 1) // play additional sound if we hit in the air with maximum damage + sound(NULL, CH_INFO, SND_MIDAIR, VOL_BASE, ATTN_NONE); + Give_Medal(actor, YODA); } -- 2.39.2