]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
make nex sound more badass when it's charged up
authorFruitieX <fruitiex@gmail.com>
Thu, 2 Dec 2010 18:31:10 +0000 (20:31 +0200)
committerFruitieX <fruitiex@gmail.com>
Thu, 2 Dec 2010 18:31:10 +0000 (20:31 +0200)
qcsrc/server/w_nex.qc
sound/weapons/nexcharge.ogg [new file with mode: 0644]

index 61f4dc2929feacf92f54270c8c185171aac8e666..dbfd72923ca7bffc6af1872191e263d6c326b227 100644 (file)
@@ -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 (file)
index 0000000..6fa152d
Binary files /dev/null and b/sound/weapons/nexcharge.ogg differ