]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/target_music.qc
Merge remote-tracking branch 'origin/divVerent/allow-override-item-model'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / target_music.qc
index 5703c146d21703d650638a7d42277c7a9f3fdfc6..c4573296a6bb0af9f35dedf39ae177855fc847bb 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_SINGLE) < 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_SINGLE, e.noise, vol, ATTN_NONE); // restart
                        else
-                               sound(e, CHAN_VOICE, "", vol, ATTN_NONE);
+                               sound(e, CH_BGM_SINGLE, "", vol, ATTN_NONE);
                        e.lastvol = vol;
                }
        }
        music_trigger = world;
 
        if(best)
-               bgmtime = getsoundtime(best, CHAN_VOICE);
+               bgmtime = getsoundtime(best, CH_BGM_SINGLE);
        else
                bgmtime = gettime(GETTIME_CDTRACK);
 }
@@ -87,10 +87,10 @@ 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_SINGLE, e.noise, 0, ATTN_NONE);
+               if(getsoundtime(e, CH_BGM_SINGLE) < 0)
                {
-                       print("Cannot initialize sound ", e.noise, "\n");
+                       print(sprintf(_("Cannot initialize sound %s\n"), e.noise));
                        strunzone(e.noise);
                        e.noise = string_null;
                }
@@ -175,10 +175,10 @@ 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_SINGLE, self.noise, 0, ATTN_NONE);
+                       if(getsoundtime(self, CH_BGM_SINGLE) < 0)
                        {
-                               print("Cannot initialize sound ", self.noise, "\n");
+                               print(sprintf(_("Cannot initialize sound %s\n"), self.noise));
                                strunzone(self.noise);
                                self.noise = string_null;
                        }