]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/target_music.qc
fix compile
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / target_music.qc
index a7a46d80ad5788c19e58e649c7d25c0a147b1376..b50d5a862a92c4da7f21a807d325736681a4e52e 100644 (file)
@@ -39,7 +39,7 @@ void TargetMusic_Advance()
                        else
                                e.state = 0;
                }
-               vol = e.state * e.volume * cvar("bgmvolume");
+               vol = e.state * e.volume * autocvar_bgmvolume;
                if(vol != vol0)
                {
                        if(vol0 < 0)
@@ -50,6 +50,11 @@ void TargetMusic_Advance()
                }
        }
        music_trigger = world;
+
+       if(best)
+               bgmtime = getsoundtime(best, CHAN_VOICE);
+       else
+               bgmtime = gettime(GETTIME_CDTRACK);
 }
 
 void Net_TargetMusic()
@@ -85,7 +90,7 @@ void Net_TargetMusic()
                sound(e, CHAN_VOICE, e.noise, 0, ATTN_NONE);
                if(getsoundtime(e, CHAN_VOICE) < 0)
                {
-                       print("Cannot initialize sound ", e.noise, "\n");
+                       print(sprintf(_("Cannot initialize sound %s\n"), e.noise));
                        strunzone(e.noise);
                        e.noise = string_null;
                }
@@ -173,7 +178,7 @@ void Ent_ReadTriggerMusic()
                        sound(self, CHAN_VOICE, self.noise, 0, ATTN_NONE);
                        if(getsoundtime(self, CHAN_VOICE) < 0)
                        {
-                               print("Cannot initialize sound ", self.noise, "\n");
+                               print(sprintf(_("Cannot initialize sound %s\n"), self.noise));
                                strunzone(self.noise);
                                self.noise = string_null;
                        }