float CH_PAIN_SINGLE = 6; // only on players and csqc
float CH_PLAYER = 7; // only on players and entities
#else
-// FIXME convert back to float .... =
float CH_INFO = 0;
float CH_TRIGGER = -3;
float CH_WEAPON_A = -1;
float CH_PAIN = -6;
float CH_PAIN_SINGLE = 6;
float CH_PLAYER = -7;
-#define sound(e,c,s,v,a) sound7(e,c,s,v,a,0,0)
#endif
float ATTN_NONE = 0;
const float XENCODE_LEN = 5;
string xencode(float f);
float xdecode(string s);
+
+#ifndef COMPAT_XON010_CHANNELS
+#define sound(e,c,s,v,a) sound7(e,c,s,v,a,0,0)
+#endif
// Sound functions
string precache_sound (string s) = #19;
-void(entity e, float chan, string samp, float vol, float atten) sound_builtin = #8;
float precache_sound_index (string s) = #19;
#define SND_VOLUME 1
return TRUE;
}
+#ifdef COMPAT_XON010_CHANNELS
+void(entity e, float chan, string samp, float vol, float atten) sound_builtin = #8;
void sound(entity e, float chan, string samp, float vol, float atten)
{
if (!sound_allowed(MSG_BROADCAST, e))
return;
sound_builtin(e, chan, samp, vol, atten);
}
+#else
+#undef sound
+void sound(entity e, float chan, string samp, float vol, float atten)
+{
+ if (!sound_allowed(MSG_BROADCAST, e))
+ return;
+ sound7(e, chan, samp, vol, atten, 0, 0);
+}
+#endif
+
void soundtoat(float dest, entity e, vector o, float chan, string samp, float vol, float atten)
{
float entno, idx;