From: z411 Date: Fri, 14 May 2021 22:05:08 +0000 (-0400) Subject: Don't show specs in duel spect HUD X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=40d61ddc3e52c996d065a8227d5007b95bf71b69;p=xonotic%2Fxonotic-data.pk3dir.git Don't show specs in duel spect HUD --- diff --git a/qcsrc/client/hud/panel/spect.qc b/qcsrc/client/hud/panel/spect.qc index 129a0063f..eb77d26eb 100644 --- a/qcsrc/client/hud/panel/spect.qc +++ b/qcsrc/client/hud/panel/spect.qc @@ -337,13 +337,17 @@ void HUD_SpectHUD() entity pl_right = pl_left.sort_next; // Left player - pos = panel_pos + vec2((vid_conwidth - 1) / 2, 0); - pos.x -= (timer_width * 1.3) / 2; - HUD_SpectHUD_drawDuelScore(pos, pl_left, true); + if(pl_left && (entcs_GetSpecState(pl_left.sv_entnum) != ENTCS_SPEC_PURE) { + pos = panel_pos + vec2((vid_conwidth - 1) / 2, 0); + pos.x -= (timer_width * 1.3) / 2; + HUD_SpectHUD_drawDuelScore(pos, pl_left, true); + } // Right player - pos = panel_pos + vec2((vid_conwidth - 1) / 2, 0); - pos.x += (timer_width * 1.3) / 2; - HUD_SpectHUD_drawDuelScore(pos, pl_right, false); + if(pl_right && (entcs_GetSpecState(pl_right.sv_entnum) != ENTCS_SPEC_PURE) { + pos = panel_pos + vec2((vid_conwidth - 1) / 2, 0); + pos.x += (timer_width * 1.3) / 2; + HUD_SpectHUD_drawDuelScore(pos, pl_right, false); + } } } diff --git a/qcsrc/client/hud/panel/timer.qc b/qcsrc/client/hud/panel/timer.qc index 6e37db992..a48776602 100644 --- a/qcsrc/client/hud/panel/timer.qc +++ b/qcsrc/client/hud/panel/timer.qc @@ -49,7 +49,8 @@ void HUD_Timer() timeleft = ceil(timeleft); // countdown sound - if(autocvar_hud_panel_timer_count && timeleft > 0 && timeleft != last_timeleft && timeleft <= 10) { + if(autocvar_hud_panel_timer_count && timeleft > 0 && timeleft != last_timeleft && timeleft <= 10) + { sound(NULL, CH_INFO, SND_ENDCOUNT, VOL_BASE, ATTN_NONE); last_timeleft = timeleft; }