]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/mutators/mutator_new_toys.qc
Merge branch 'terencehill/slider_anim_improvements' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / mutators / mutator_new_toys.qc
index 172ee4d651430b2d8a6e08458f54cfb71a4f17f9..9b51d9abb8640fbcaf4f3bbcf5ef83d5f652f760 100644 (file)
@@ -190,8 +190,10 @@ MUTATOR_HOOKFUNCTION(nt_SetWeaponreplace)
 
 MUTATOR_HOOKFUNCTION(nt_FilterItem)
 {SELFPARAM();
-       if(nt_IsNewToy(self.weapon) && autocvar_g_new_toys_use_pickupsound)
-               self.item_pickupsound = W_Sound("weaponpickup_new_toys");
+       if(nt_IsNewToy(self.weapon) && autocvar_g_new_toys_use_pickupsound) {
+               self.item_pickupsound = string_null;
+               self.item_pickupsound_ent = SND_WEAPONPICKUP_NEW_TOYS;
+       }
        return 0;
 }
 
@@ -207,8 +209,6 @@ MUTATOR_DEFINITION(mutator_new_toys)
                if(time > 1) // game loads at time 1
                        error("This cannot be added at runtime\n");
 
-               precache_sound(W_Sound("weaponpickup_new_toys"));
-
                // mark the guns as ok to use by e.g. impulse 99
                float i;
                for(i = WEP_FIRST; i <= WEP_LAST; ++i)