From 7c3296dd294ef3c9633b5b7658396296d16e49b6 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Fri, 2 Aug 2013 12:42:43 +0200 Subject: [PATCH] oops, more compat :P --- qcsrc/client/Main.qc | 2 ++ qcsrc/client/target_music.qc | 10 +++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/qcsrc/client/Main.qc b/qcsrc/client/Main.qc index 42fadc0c1..de4428d89 100644 --- a/qcsrc/client/Main.qc +++ b/qcsrc/client/Main.qc @@ -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; diff --git a/qcsrc/client/target_music.qc b/qcsrc/client/target_music.qc index 6ae591d77..25cbcb3d1 100644 --- a/qcsrc/client/target_music.qc +++ b/qcsrc/client/target_music.qc @@ -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() -- 2.39.2