]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/effects/qc/globalsound.qh
Merge branch 'master' into martin-t/globals
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / effects / qc / globalsound.qh
index 640d330f1c0cc139d46266e77b05115507c7cc9d..8b1570f030053124aae84b13ee04ba92394ff471 100644 (file)
@@ -1,5 +1,4 @@
-#ifndef GLOBALSOUND_H
-#define GLOBALSOUND_H
+#pragma once
 
 #ifdef SVQC
        /** Use new sound handling. TODO: use when sounds play correctly on clients */
@@ -120,6 +119,8 @@ void PrecachePlayerSounds(string f);
 //#endif
 entity GetVoiceMessage(string type);
 
+string GlobalSound_sample(string pair, float r);
+
 #ifdef SVQC
 
        void _GlobalSound(entity this, entity gs, entity ps, string sample, float chan, float vol, float voicetype, bool fake);
@@ -128,7 +129,6 @@ entity GetVoiceMessage(string type);
        #define PlayerSound(this, def, chan, vol, voicetype) _GlobalSound(this, NULL, def, string_null, chan, vol, voicetype, false)
        #define VoiceMessage(this, def, msg) \
                MACRO_BEGIN \
-               { \
                        entity VM = def; \
                        int voicetype = VM.m_playersoundvt; \
                        bool ownteam = (voicetype == VOICETYPE_TEAMRADIO); \
@@ -138,7 +138,7 @@ entity GetVoiceMessage(string type);
                        else if (flood > 0) fake = false; \
                        else break; \
                        _GlobalSound(this, NULL, VM, string_null, CH_VOICE, VOL_BASEVOICE, voicetype, fake); \
-               MACRO_END
+               MACRO_END
 
 #endif
 
@@ -148,5 +148,3 @@ STATIC_INIT(allvoicesamples)
     FOREACH(PlayerSounds, it.instanceOfVoiceMessage, allvoicesamples = strcat(allvoicesamples, " ", it.m_playersoundstr));
     allvoicesamples = strzone(substring(allvoicesamples, 1, -1));
 }
-
-#endif