]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/weapons/all.qc
Add a function to control weapon sound paths with hooks
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / weapons / all.qc
index 3f0d6a097820b0b9e9ab81fcdeb46b559688503a..4dcb2d6e7c2446b006a960c862c7cfaa52421c9d 100644 (file)
@@ -330,4 +330,21 @@ int GetAmmoStat(.int ammotype)
        }
 }
 #endif
+
+#ifdef SVQC
+string W_Sound(string w_snd)
+{
+       string output = strcat("weapons/", w_snd, ".wav");
+       MUTATOR_CALLHOOK(WeaponSound, w_snd, output);
+       return output;
+}
+
+string W_Model(string w_mdl)
+{
+       string output = strcat("models/weapons/", w_mdl);
+       MUTATOR_CALLHOOK(WeaponModel, w_mdl, output);
+       return output;
+}
+#endif
+
 #endif