]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Don't show specs in duel spect HUD
authorz411 <z411@omaera.org>
Fri, 14 May 2021 22:05:08 +0000 (18:05 -0400)
committerz411 <z411@omaera.org>
Fri, 14 May 2021 22:05:08 +0000 (18:05 -0400)
qcsrc/client/hud/panel/spect.qc
qcsrc/client/hud/panel/timer.qc

index 129a0063f328c900c70209ec589d5d0e79a414db..eb77d26eb272b6ef64da15c07032b2b03b975cf8 100644 (file)
@@ -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);
+               }
        }
 }
index 6e37db992f866add78f40046cfc85c186f9d2bda..a4877660235a9526094e9e8f3e320b6b9664c6b3 100644 (file)
@@ -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;
        }