]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/mutators/mutator_new_toys.qc
Add a function to control weapon sound paths with hooks
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / mutators / mutator_new_toys.qc
index 78875cb70f20227bbdb1d995cfc982522e05717c..edbdc8aa826f622c62f22fca792285ce9e367154 100644 (file)
@@ -190,7 +190,7 @@ MUTATOR_HOOKFUNCTION(nt_SetWeaponreplace)
 MUTATOR_HOOKFUNCTION(nt_FilterItem)
 {
        if(nt_IsNewToy(self.weapon))
-               self.item_pickupsound = "weapons/weaponpickup_new_toys.wav";
+               self.item_pickupsound = W_Sound("weaponpickup_new_toys");
        return 0;
 }
 
@@ -206,7 +206,7 @@ MUTATOR_DEFINITION(mutator_new_toys)
                if(time > 1) // game loads at time 1
                        error("This cannot be added at runtime\n");
 
-               precache_sound("weapons/weaponpickup_new_toys.wav");
+               precache_sound(W_Sound("weaponpickup_new_toys"));
 
                // mark the guns as ok to use by e.g. impulse 99
                float i;