]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/effects/qc/globalsound.qh
Globalsound: assert source is a player
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / effects / qc / globalsound.qh
index 4b86da5c8f6fda1cb51c139cf76ef1e7ad08bbd3..892d3d078b3dfb523f41c6bb59ea44d4eb8c0ec6 100644 (file)
@@ -121,11 +121,11 @@ void PrecachePlayerSounds(string f);
 
 #ifdef SVQC
 
-       void _GlobalSound(entity gs, entity ps, string sample, float chan, float voicetype, bool fake);
-       #define GlobalSound(def, chan, voicetype) _GlobalSound(def, NULL, string_null, chan, voicetype, false)
-       #define GlobalSound_string(def, chan, voicetype) _GlobalSound(NULL, NULL, def, chan, voicetype, false)
-       #define PlayerSound(def, chan, voicetype) _GlobalSound(NULL, def, string_null, chan, voicetype, false)
-       #define VoiceMessage(def, msg) \
+       void _GlobalSound(entity this, entity gs, entity ps, string sample, float chan, float voicetype, bool fake);
+       #define GlobalSound(this, def, chan, voicetype) _GlobalSound(this, def, NULL, string_null, chan, voicetype, false)
+       #define GlobalSound_string(this, def, chan, voicetype) _GlobalSound(this, NULL, NULL, def, chan, voicetype, false)
+       #define PlayerSound(thise, def, chan, voicetype) _GlobalSound(this, NULL, def, string_null, chan, voicetype, false)
+       #define VoiceMessage(this, def, msg) \
                do \
                { \
                        entity VM = def; \
@@ -136,7 +136,7 @@ void PrecachePlayerSounds(string f);
                        if (IS_SPEC(this) || IS_OBSERVER(this) || flood < 0) fake = true; \
                        else if (flood > 0) fake = false; \
                        else break; \
-                       _GlobalSound(NULL, VM, string_null, CH_VOICE, voicetype, fake); \
+                       _GlobalSound(this, NULL, VM, string_null, CH_VOICE, voicetype, fake); \
                } \
                while (0)