From: Rudolf Polzer Date: Sat, 2 Jul 2011 12:27:38 +0000 (+0200) Subject: allow to send sound packets with channel higher than 7, or lower than 0 X-Git-Tag: xonotic-v0.5.0~159^2~2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=1e08b2e8905373fdb774f91fe9af818664028fbc;p=xonotic%2Fxonotic-data.pk3dir.git allow to send sound packets with channel higher than 7, or lower than 0 --- diff --git a/qcsrc/server/miscfunctions.qc b/qcsrc/server/miscfunctions.qc index 9e6e705e4..c51c8727d 100644 --- a/qcsrc/server/miscfunctions.qc +++ b/qcsrc/server/miscfunctions.qc @@ -1371,7 +1371,7 @@ void soundtoat(float dest, entity e, vector o, float chan, string samp, float vo sflags |= SND_VOLUME; if (atten != 64) sflags |= SND_ATTENUATION; - if (entno >= 8192) + if (entno >= 8192 || chan < 0 || chan > 7) sflags |= SND_LARGEENTITY; if (idx >= 256) sflags |= SND_LARGESOUND; @@ -1385,7 +1385,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); + WriteByte(dest, chan & 0xFF); } else {