From 04630e313291ac82f0d075644bba4739f1930a51 Mon Sep 17 00:00:00 2001 From: Mario Date: Sun, 30 Aug 2015 22:40:21 +1000 Subject: [PATCH] Add an option to disable the 'New toys, new toys!' roflsound in new toys mutator --- mutators.cfg | 1 + qcsrc/server/mutators/mutator_new_toys.qc | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/mutators.cfg b/mutators.cfg index 7dd5e6d114..8f908086eb 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 399d81b141..1d4beda65d 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; } -- 2.39.2