X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fmiscfunctions.qc;h=69704999725bf1cb45e5a198a6b32b63af719707;hb=881b13c2d2d798d9d76b9bd7ef63ea5ca457213d;hp=28a15d74763c20bd4fec02bee05e45e4fc703a6a;hpb=24624c2a8951ccd2bb61c66522ea847634bca58a;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/miscfunctions.qc b/qcsrc/server/miscfunctions.qc index 28a15d747..697049997 100644 --- a/qcsrc/server/miscfunctions.qc +++ b/qcsrc/server/miscfunctions.qc @@ -1313,7 +1313,6 @@ void readlevelcvars(void) // 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 @@ -1345,12 +1344,24 @@ float sound_allowed(float dest, entity e) 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;