From: Samual Date: Wed, 26 Oct 2011 04:30:45 +0000 (-0400) Subject: Some more work on announcer.qc X-Git-Tag: xonotic-v0.6.0~35^2~66^2~2^2~12 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=1b3a4d764aff75cf63029cfdd7a0c5b8d6d986e0;p=xonotic%2Fxonotic-data.pk3dir.git Some more work on announcer.qc --- diff --git a/qcsrc/client/announcer.qc b/qcsrc/client/announcer.qc index 49e2b2cbe..83ceaff74 100644 --- a/qcsrc/client/announcer.qc +++ b/qcsrc/client/announcer.qc @@ -2,7 +2,7 @@ float previous_announcement_time; float previous_game_starttime; string previous_announcement; -//remaining maptime announcer sounds, true when sound was already played +// remaining maptime announcer sounds, true when sound was already played float announcer_1min; float announcer_5min; @@ -116,12 +116,14 @@ void Announcer_Time() { if (announcer_1min) { - if(((!warmup_stage || autocvar_g_warmup_limit == 0) && timeleft > 60) || (warmup_stage && autocvar_g_warmup_limit > 0 && warmup_timeleft > 60)) - announcer_1min = FALSE; + if(((!warmup_stage || autocvar_g_warmup_limit == 0) && timeleft > 60) + || (warmup_stage && autocvar_g_warmup_limit > 0 && warmup_timeleft > 60)) + announcer_1min = FALSE; } - else if(((!warmup_stage || autocvar_g_warmup_limit == 0) && timelimit > 0 && timeleft < 60) || (warmup_stage && autocvar_g_warmup_limit > 0 && warmup_timeleft < 60)) + else if(((!warmup_stage || autocvar_g_warmup_limit == 0) && timelimit > 0 && timeleft < 60) + || (warmup_stage && autocvar_g_warmup_limit > 0 && warmup_timeleft < 60)) { - //if we're in warmup mode, check whether there's a warmup timelimit + // if we're in warmup mode, check whether there's a warmup timelimit if not(autocvar_g_warmup_limit == -1 && warmup_stage) { announcer_1min = TRUE; @@ -186,7 +188,8 @@ void Announcer() * Add all future announcer sounds precaches here. * TODO: announcer queues */ -void Announcer_Precache () { +void Announcer_Precache () +{ precache_sound (strcat("announcer/", autocvar_cl_announcer, "/1minuteremains.wav")); precache_sound (strcat("announcer/", autocvar_cl_announcer, "/5minutesremain.wav"));