From 965780ed520827bbc0cf6f741cd40fb77e2421bd Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Sat, 2 Jul 2011 16:26:33 +0200 Subject: [PATCH] support DP_SND_MORECHANNELS in soundtoat() function too --- qcsrc/server/miscfunctions.qc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/qcsrc/server/miscfunctions.qc b/qcsrc/server/miscfunctions.qc index c51c8727d..d9e130fd4 100644 --- a/qcsrc/server/miscfunctions.qc +++ b/qcsrc/server/miscfunctions.qc @@ -1361,6 +1361,8 @@ void soundtoat(float dest, entity e, vector o, float chan, string samp, float vo entno = num_for_edict(e); idx = precache_sound_index(samp); + chan = ((chan & 0x07) | ((chan & 0x1F0) / 2)); + float sflags; sflags = 0; @@ -1385,7 +1387,7 @@ void soundtoat(float dest, entity e, vector o, float chan, string samp, float vo if (sflags & SND_LARGEENTITY) { WriteShort(dest, entno); - WriteByte(dest, chan & 0xFF); + WriteByte(dest, chan); } else { @@ -1412,7 +1414,7 @@ void soundto(float dest, entity e, float chan, string samp, float vol, float att } void soundat(entity e, vector o, float chan, string samp, float vol, float atten) { - soundtoat(MSG_BROADCAST, e, o, chan, samp, vol, atten); + soundtoat(((chan & 8) ? MSG_ALL : MSG_BROADCAST), e, o, chan, samp, vol, atten); } void stopsoundto(float dest, entity e, float chan) { -- 2.39.2