From: Mario Date: Sun, 30 Aug 2015 12:40:21 +0000 (+1000) Subject: Add an option to disable the 'New toys, new toys!' roflsound in new toys mutator X-Git-Tag: xonotic-v0.8.2~1954 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=04630e313291ac82f0d075644bba4739f1930a51;p=xonotic%2Fxonotic-data.pk3dir.git Add an option to disable the 'New toys, new toys!' roflsound in new toys mutator --- diff --git a/mutators.cfg b/mutators.cfg index 7dd5e6d11..8f908086e 100644 --- a/mutators.cfg +++ b/mutators.cfg @@ -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" // ======= diff --git a/qcsrc/server/mutators/mutator_new_toys.qc b/qcsrc/server/mutators/mutator_new_toys.qc index 399d81b14..1d4beda65 100644 --- a/qcsrc/server/mutators/mutator_new_toys.qc +++ b/qcsrc/server/mutators/mutator_new_toys.qc @@ -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; }