]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
fix compile
authorRudolf Polzer <divVerent@xonotic.org>
Mon, 4 Jul 2011 11:59:47 +0000 (13:59 +0200)
committerRudolf Polzer <divVerent@xonotic.org>
Mon, 4 Jul 2011 11:59:47 +0000 (13:59 +0200)
qcsrc/common/constants.qh
qcsrc/common/util.qh
qcsrc/server/miscfunctions.qc

index 86389c6b4ae1e674f619bfc1d9202439803d6361..de0edbb31f3a6eba94c9bc38381a8f753388c668 100644 (file)
@@ -444,7 +444,6 @@ float CH_PAIN = 6; // only on players and csqc
 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;
@@ -458,7 +457,6 @@ float CH_WEAPON_B = -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;
index 5a5792cb73e054e8ef54a60f9ef4bdab9725a775..9071c1c7cc1ae5aa4ab29d592e713e6621195be2 100644 (file)
@@ -265,3 +265,7 @@ const float XENCODE_MAX = 21295; // 2*22*22*22-1
 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
index 28a15d74763c20bd4fec02bee05e45e4fc703a6a..69704999725bf1cb45e5a198a6b32b63af719707 100644 (file)
@@ -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;