From: FruitieX Date: Thu, 2 Dec 2010 18:31:10 +0000 (+0200) Subject: make nex sound more badass when it's charged up X-Git-Tag: xonotic-v0.1.0preview~76^2~5 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=959a182a5a31a35148dfcbac5b97ef0bf5e64888;p=xonotic%2Fxonotic-data.pk3dir.git make nex sound more badass when it's charged up --- diff --git a/qcsrc/server/w_nex.qc b/qcsrc/server/w_nex.qc index 61f4dc292..dbfd72923 100644 --- a/qcsrc/server/w_nex.qc +++ b/qcsrc/server/w_nex.qc @@ -55,6 +55,10 @@ void W_Nex_Attack (float issecondary) myforce *= charge; W_SetupShot (self, TRUE, 5, "weapons/nexfire.wav", CHAN_WEAPON, mydmg); + if(charge > cvar("g_balance_nex_charge_limit") && cvar("g_balance_nex_charge_limit")) // if the Nex is overcharged, we play an extra sound + { + sound (self, CHAN_WEAPON2, "weapons/nexcharge.wav", VOL_BASE * (charge - 0.5 * cvar("g_balance_nex_charge_limit")) / (1 - 0.5 * cvar("g_balance_nex_charge_limit")), ATTN_NORM); + } yoda = 0; FireRailgunBullet (w_shotorg, w_shotorg + w_shotdir * MAX_SHOT_DISTANCE, mydmg, myforce, mymindist, mymaxdist, myhalflife, myforcehalflife, WEP_NEX); diff --git a/sound/weapons/nexcharge.ogg b/sound/weapons/nexcharge.ogg new file mode 100644 index 000000000..6fa152dc3 Binary files /dev/null and b/sound/weapons/nexcharge.ogg differ