]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Add an option to disable the 'New toys, new toys!' roflsound in new toys mutator
authorMario <zacjardine@y7mail.com>
Sun, 30 Aug 2015 12:40:21 +0000 (22:40 +1000)
committerMario <zacjardine@y7mail.com>
Sun, 30 Aug 2015 12:40:21 +0000 (22:40 +1000)
mutators.cfg
qcsrc/server/mutators/mutator_new_toys.qc

index 7dd5e6d1146e5587b60995c5bed1a14120291aba..8f908086eb510fbc881657784669bda269baaf64 100644 (file)
@@ -273,6 +273,7 @@ set g_campcheck_distance 1800
 // ==========
 set g_new_toys 0 "Mutator 'New Toys': enable extra fun guns"
 set g_new_toys_autoreplace 2 "0: never replace, 1: always auto replace guns by available new toys, 2: randomly auto replace guns by available new toys"
+set g_new_toys_use_pickupsound 1 "play the 'new toys, new toys!' roflsound when picking up a new toys weapon"
 
 
 // =======
index 399d81b141c6bfce46cc1fb4a33283be759ad8ad..1d4beda65d4dfa27efd1bed57031c84d7d0efa4c 100644 (file)
@@ -73,6 +73,7 @@ roflsound "New toys, new toys!" sound.
 .string new_toys;
 
 float autocvar_g_new_toys_autoreplace;
+bool autocvar_g_new_toys_use_pickupsound = true;
 const float NT_AUTOREPLACE_NEVER = 0;
 const float NT_AUTOREPLACE_ALWAYS = 1;
 const float NT_AUTOREPLACE_RANDOM = 2;
@@ -189,7 +190,7 @@ MUTATOR_HOOKFUNCTION(nt_SetWeaponreplace)
 
 MUTATOR_HOOKFUNCTION(nt_FilterItem)
 {
-       if(nt_IsNewToy(self.weapon))
+       if(nt_IsNewToy(self.weapon) && autocvar_g_new_toys_use_pickupsound)
                self.item_pickupsound = W_Sound("weaponpickup_new_toys");
        return 0;
 }