// Timer (#5)
float last_timeleft;
-bool autocvar_hud_panel_timer_count = true;
+int autocvar_cl_timer_countdown = 3; // 0 = disabled, 1 = always on, 2 = only spec, 3 = as dictated by server
void HUD_Timer_Export(int fh)
{
timeleft = ceil(timeleft);
// countdown sound
- if(autocvar_hud_panel_timer_count && timeleft > 0 && timeleft != last_timeleft && timeleft <= 10)
+ // if 3 use server dictated option, otherwise the client's
+ int countdown_type;
+ if(autocvar_cl_timer_countdown == 3)
+ countdown_type = sv_timer_countdown;
+ else
+ countdown_type = autocvar_cl_timer_countdown;
+
+ if(countdown_type && !warmup_stage && timeleft > 0 && timeleft != last_timeleft && timeleft <= 10)
{
- sound(NULL, CH_INFO, SND_ENDCOUNT, VOL_BASE, ATTN_NONE);
+ if(countdown_type == 1 || (countdown_type == 2 && spectatee_status))
+ sound(NULL, CH_INFO, SND_ENDCOUNT, VOL_BASE, ATTN_NONE);
+
last_timeleft = timeleft;
}
strcpy(hostname_full, ReadString());
strcpy(motd_permanent, ReadString());
+
+ sv_timer_countdown = ReadByte();
return = true;
// z411 send full hostname
WriteString(channel, (autocvar_hostname_full != "" ? autocvar_hostname_full : autocvar_hostname));
WriteString(channel, autocvar_sv_motd_permanent);
+
+ // z411 send client countdown type
+ WriteByte(channel, autocvar_sv_timer_countdown);
}
void ClientInit_CheckUpdate(entity this)
// Medals
float autocvar_g_medals_excellent_time = 2;
+// Timer
+int autocvar_sv_timer_countdown = 1; // 0 = disabled, 1 = enabled, 2 = spect only
+
// WEAPONTODO
.string weaponorder_byimpulse;