]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/effects/qc/globalsound.qh
Add support for pitch shifting to the QC sound sending implementation, apply pitch...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / effects / qc / globalsound.qh
index b5631ed5fd246774277adb823dae760d31700b9d..5460d72ac07d90671728f64e9a46e8d696fc4aec 100644 (file)
@@ -11,7 +11,6 @@
 ..string m_playersoundfld;
 
 REGISTRY(PlayerSounds, BITS(8) - 1)
-#define PlayerSounds_from(i) _PlayerSounds_from(i, NULL)
 #define REGISTER_PLAYERSOUND(id) \
        .string _playersound_##id; \
        REGISTER(PlayerSounds, playersound, id, m_id, new_pure(PlayerSound)) \
@@ -21,6 +20,8 @@ REGISTRY(PlayerSounds, BITS(8) - 1)
        }
 REGISTER_REGISTRY(PlayerSounds)
 REGISTRY_SORT(PlayerSounds)
+
+REGISTRY_DEFINE_GET(PlayerSounds, NULL)
 STATIC_INIT(PlayerSounds_renumber)
 {
        FOREACH(PlayerSounds, true, it.m_id = i);
@@ -84,7 +85,6 @@ REGISTER_VOICEMSG(seenenemy, VOICETYPE_TEAMRADIO, false)
 
 .string m_globalsoundstr;
 REGISTRY(GlobalSounds, BITS(8) - 1)
-#define GlobalSounds_from(i) _GlobalSounds_from(i, NULL)
 #define REGISTER_GLOBALSOUND(id, str) \
        REGISTER(GlobalSounds, GS, id, m_id, new_pure(GlobalSound)) \
        { \
@@ -92,6 +92,8 @@ REGISTRY(GlobalSounds, BITS(8) - 1)
        }
 REGISTER_REGISTRY(GlobalSounds)
 REGISTRY_SORT(GlobalSounds)
+
+REGISTRY_DEFINE_GET(GlobalSounds, NULL)
 STATIC_INIT(GlobalSounds_renumber)
 {
        FOREACH(GlobalSounds, true, it.m_id = i);
@@ -121,6 +123,8 @@ entity GetVoiceMessage(string type);
 
 string GlobalSound_sample(string pair, float r);
 
+float GlobalSound_pitch(float _pitch);
+
 #ifdef SVQC
 
        void _GlobalSound(entity this, entity gs, entity ps, string sample, float chan, float vol, float voicetype, bool fake);