]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
oops, more compat :P
authorRudolf Polzer <divverent@xonotic.org>
Fri, 2 Aug 2013 10:42:43 +0000 (12:42 +0200)
committerRudolf Polzer <divverent@xonotic.org>
Fri, 2 Aug 2013 10:42:43 +0000 (12:42 +0200)
qcsrc/client/Main.qc
qcsrc/client/target_music.qc

index 42fadc0c18a86b0cc0cec1eb145409adebe08efb..de4428d891b0c9d7becf32668f5123e7503b2986 100644 (file)
@@ -35,6 +35,7 @@ float __engine_check;
 string forcefog;
 void WaypointSprite_Load();
 void ConsoleCommand_macro_init();
+void Init_TargetMusic();
 void CSQC_Init(void)
 {
        prvm_language = cvar_string("prvm_language");
@@ -151,6 +152,7 @@ void CSQC_Init(void)
        minimapname = strzone(minimapname);
 
        WarpZone_Init();
+       Init_TargetMusic();
 
        hud_skin_path = strzone(strcat("gfx/hud/", autocvar_hud_skin));
        hud_configure_prev = -1;
index 6ae591d77acaf1a277424fd8c8b43fb7b12a0a96..25cbcb3d1f56a40bf5f8f21a0c8dd9c1c7dd05fe 100644 (file)
@@ -42,7 +42,11 @@ void TargetMusic_Advance()
                if(vol != vol0)
                {
                        if(e.noise == "")
+#ifdef COMPAT_XON070_BGMVOLUME
+                               cvar_settemp("bgmvolume", ftos(vol));
+#else
                                cvar_set("bgmvolume", ftos(vol));
+#endif
                        else if(vol0 < 0)
                                sound(e, CH_BGM_SINGLE, e.noise, vol, ATTN_NONE); // restart
                        else
@@ -52,10 +56,10 @@ void TargetMusic_Advance()
        }
        music_trigger = world;
 
-       if(best)
-               bgmtime = getsoundtime(best, CH_BGM_SINGLE);
-       else
+       if(best.noise == "")
                bgmtime = gettime(GETTIME_CDTRACK);
+       else
+               bgmtime = getsoundtime(best, CH_BGM_SINGLE);
 }
 
 void Init_TargetMusic()