From: terencehill Date: Sat, 12 Dec 2020 12:41:22 +0000 (+0100) Subject: Fix centerprint panel glitch when scoreboard bottom is far down X-Git-Tag: xonotic-v0.8.5~588^2~2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=751eb58802ffa1393a034e2cd24fafa1ef214743;p=xonotic%2Fxonotic-data.pk3dir.git Fix centerprint panel glitch when scoreboard bottom is far down --- diff --git a/qcsrc/client/hud/panel/centerprint.qc b/qcsrc/client/hud/panel/centerprint.qc index a0a5389e7..105908094 100644 --- a/qcsrc/client/hud/panel/centerprint.qc +++ b/qcsrc/client/hud/panel/centerprint.qc @@ -189,7 +189,7 @@ void HUD_CenterPrint() if ( HUD_Radar_Clickable() ) { - if (hud_panel_radar_bottom >= 0.96 * vid_conheight) + if (hud_panel_radar_bottom >= vid_conheight) return; panel_pos.x = 0.5 * (vid_conwidth - panel_size.x); @@ -198,15 +198,16 @@ void HUD_CenterPrint() } else if(!autocvar__hud_configure && scoreboard_fade_alpha) { - // move the panel below the scoreboard - if (scoreboard_bottom >= 0.96 * vid_conheight) - return; vector target_pos = vec2(0.5 * (vid_conwidth - panel_size.x), scoreboard_bottom); if(target_pos.y > panel_pos.y) { panel_pos = panel_pos + (target_pos - panel_pos) * sqrt(scoreboard_fade_alpha); panel_size.y = min(panel_size.y, vid_conheight - scoreboard_bottom); } + + // move the panel below the scoreboard + if (panel_pos.y >= vid_conheight) + return; } if (autocvar_hud_panel_centerprint_dynamichud)