]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
support DP_SND_MORECHANNELS in soundtoat() function too
authorRudolf Polzer <divverent@xonotic.org>
Sat, 2 Jul 2011 14:26:33 +0000 (16:26 +0200)
committerRudolf Polzer <divverent@xonotic.org>
Sat, 2 Jul 2011 14:26:33 +0000 (16:26 +0200)
qcsrc/server/miscfunctions.qc

index c51c8727d96e24601e49e989180f348bf0b5f615..d9e130fd41794b465aa34c435591be0be5ce6a01 100644 (file)
@@ -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)
 {