From: Rudolf Polzer Date: Fri, 2 Aug 2013 10:42:43 +0000 (+0200) Subject: oops, more compat :P X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=7c3296dd294ef3c9633b5b7658396296d16e49b6;p=xonotic%2Fxonotic-data.pk3dir.git oops, more compat :P --- 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()