]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
get rid of CHAN_VOICE now
authorRudolf Polzer <divverent@xonotic.org>
Sun, 3 Jul 2011 15:25:23 +0000 (17:25 +0200)
committerRudolf Polzer <divverent@xonotic.org>
Sun, 3 Jul 2011 15:27:17 +0000 (17:27 +0200)
qcsrc/client/target_music.qc
qcsrc/common/constants.qh
qcsrc/server/cl_client.qc
qcsrc/server/cl_player.qc

index b50d5a862a92c4da7f21a807d325736681a4e52e..87c9cc75a4ab9726562991976eb76211a9321b8e 100644 (file)
@@ -19,7 +19,7 @@ void TargetMusic_Advance()
        for(e = world; (e = findfloat(e, enttype, ENT_CLIENT_TRIGGER_MUSIC)); ) if(e.noise)
        {
                vol0 = e.lastvol;
-               if(getsoundtime(e, CHAN_VOICE) < 0)
+               if(getsoundtime(e, CH_BGM) < 0)
                {
                        vol0 = -1;
                }
@@ -43,16 +43,16 @@ void TargetMusic_Advance()
                if(vol != vol0)
                {
                        if(vol0 < 0)
-                               sound(e, CHAN_VOICE, e.noise, vol, ATTN_NONE); // restart
+                               sound(e, CH_BGM, e.noise, vol, ATTN_NONE); // restart
                        else
-                               sound(e, CHAN_VOICE, "", vol, ATTN_NONE);
+                               sound(e, CH_BGM, "", vol, ATTN_NONE);
                        e.lastvol = vol;
                }
        }
        music_trigger = world;
 
        if(best)
-               bgmtime = getsoundtime(best, CHAN_VOICE);
+               bgmtime = getsoundtime(best, CH_BGM);
        else
                bgmtime = gettime(GETTIME_CDTRACK);
 }
@@ -87,8 +87,8 @@ void Net_TargetMusic()
                        strunzone(e.noise);
                e.noise = strzone(noi);
                precache_sound(e.noise);
-               sound(e, CHAN_VOICE, e.noise, 0, ATTN_NONE);
-               if(getsoundtime(e, CHAN_VOICE) < 0)
+               sound(e, CH_BGM, e.noise, 0, ATTN_NONE);
+               if(getsoundtime(e, CH_BGM) < 0)
                {
                        print(sprintf(_("Cannot initialize sound %s\n"), e.noise));
                        strunzone(e.noise);
@@ -175,8 +175,8 @@ void Ent_ReadTriggerMusic()
                if(self.noise != s)
                {
                        precache_sound(self.noise);
-                       sound(self, CHAN_VOICE, self.noise, 0, ATTN_NONE);
-                       if(getsoundtime(self, CHAN_VOICE) < 0)
+                       sound(self, CH_BGM, self.noise, 0, ATTN_NONE);
+                       if(getsoundtime(self, CH_BGM) < 0)
                        {
                                print(sprintf(_("Cannot initialize sound %s\n"), self.noise));
                                strunzone(self.noise);
index 4997815800d414db43fdac46f860e60bad1b3d5d..9f1aa13e3018a175cb21f005722ed084a577c38d 100644 (file)
@@ -434,7 +434,6 @@ float CH_INFO = 0; // only on world and csqc
 float CH_ITEMS = 0; // only on players
 float CH_WEAPON_A = 1; // only on players and entities
 float CH_VOICE = 2; // only on players
-float CH_AMBIENT = 2; // only on entities
 float CH_BGM = 2; // only on csqc
 float CH_TRIGGERS_SINGLE = 3; // only on players, entities, csqc
 float CH_SHOTS_SINGLE = 4; // only on players, entities, csqc
@@ -448,7 +447,6 @@ float CH_SHOTS_SINGLE = 4;
 float CH_ITEMS = 256;
 float CH_WEAPON_A = 257;
 float CH_VOICE = 258;
-float CH_AMBIENT = 259;
 float CH_BGM = 260;
 float CH_WEAPON_B = 257;
 float CH_PAIN = 262;
@@ -469,7 +467,7 @@ float       CHAN_WEAPON                             = 1; // Weapon fire
 float  CHAN_VOICE                              = 2; // Voice/Radio
        // on world: UNUSED
        // on players: voice                             VOICE
-       // on entities: ambient                          AMBIENT
+       // on entities: UNUSED
        // on csqc: background music                     BGM
 float  CHAN_TRIGGER                    = 3; // Triggers/Items
        // on world: UNUSED
index 2bd2c0f58684833136a0c5aa7dd82bf5b307b051..58dc6d350fbbcd36f7ab07ab61cb20c0d67d111e 100644 (file)
@@ -3011,7 +3011,7 @@ void PlayerPreThink (void)
                oldself = self; self = self.teamkill_soundsource;
                oldpusher = self.pusher; self.pusher = oldself;
 
-               PlayerSound(playersound_teamshoot, CHAN_VOICE, VOICETYPE_LASTATTACKER_ONLY);
+               PlayerSound(playersound_teamshoot, CH_VOICE, VOICETYPE_LASTATTACKER_ONLY);
 
                self.pusher = oldpusher;
                self = oldself;
@@ -3021,7 +3021,7 @@ void PlayerPreThink (void)
        if(time > self.taunt_soundtime)
        {
                self.taunt_soundtime = 0;
-               PlayerSound(playersound_taunt, CHAN_VOICE, VOICETYPE_AUTOTAUNT);
+               PlayerSound(playersound_taunt, CH_VOICE, VOICETYPE_AUTOTAUNT);
        }
 
        target_voicescript_next(self);
index abee5c9d713df44227d593a6060c06905742e459..21915eac6cb79e2bc66f08c3e9e655adf25d6d5f 100644 (file)
@@ -1336,9 +1336,9 @@ void VoiceMessage(string type, string msg)
        flood = Say(self, ownteam, world, msg, 1);
 
        if (flood > 0)
-               GlobalSound(self.sample, CHAN_VOICE, voicetype);
+               GlobalSound(self.sample, CH_VOICE, voicetype);
        else if (flood < 0)
-               FakeGlobalSound(self.sample, CHAN_VOICE, voicetype);
+               FakeGlobalSound(self.sample, CH_VOICE, voicetype);
 }
 
 void MoveToTeam(entity client, float team_colour, float type, float show_message)