From ceb0b03a922c70089a4599c8bc77124f6f5c583c Mon Sep 17 00:00:00 2001 From: z411 Date: Mon, 21 Mar 2022 15:58:31 -0300 Subject: [PATCH] Using proper centerprint title spacing --- qcsrc/client/announcer.qc | 2 +- qcsrc/client/hud/panel/centerprint.qc | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/qcsrc/client/announcer.qc b/qcsrc/client/announcer.qc index bd89c8045..bbd8cd885 100644 --- a/qcsrc/client/announcer.qc +++ b/qcsrc/client/announcer.qc @@ -115,7 +115,7 @@ void Announcer_Gamestart() string pl1_name = (pl1 && pl1.team != NUM_SPECTATOR ? entcs_GetName(pl1.sv_entnum) : "???"); string pl2_name = (pl2 && pl2.team != NUM_SPECTATOR ? entcs_GetName(pl2.sv_entnum) : "???"); - centerprint_SetTitle(sprintf(_("^BG%s^BG vs %s"), pl1_name, pl2_name)); // Show duelers in 1v1 game mode + centerprint_SetTitle(sprintf(_("^BG%s^BG vs %s"), pl1_name, pl2_name)); // Show duelers in 1v1 game mode } else centerprint_SetTitle(strcat("^BG", MapInfo_Type_ToText(gametype))); // Show game type as title diff --git a/qcsrc/client/hud/panel/centerprint.qc b/qcsrc/client/hud/panel/centerprint.qc index d6b154200..2d96826c8 100644 --- a/qcsrc/client/hud/panel/centerprint.qc +++ b/qcsrc/client/hud/panel/centerprint.qc @@ -34,7 +34,7 @@ void HUD_CenterPrint_Export(int fh) const int CENTERPRINT_MAX_MSGS = 10; const int CENTERPRINT_MAX_ENTRIES = 50; const float CENTERPRINT_SPACING = 0.5; -const float CENTERPRINT_TITLE_SPACING = 0.8; +const float CENTERPRINT_TITLE_SPACING = 0.35; int cpm_index; string centerprint_messages[CENTERPRINT_MAX_MSGS]; int centerprint_msgID[CENTERPRINT_MAX_MSGS]; @@ -272,16 +272,16 @@ void HUD_CenterPrint() drawcolorcodedstring(pos, centerprint_title, fontsize, 1, DRAWFLAG_NORMAL); if (autocvar_hud_panel_centerprint_flip) - pos.y -= cp_fontsize.y * (CENTERPRINT_TITLE_SPACING / 2); + pos.y -= cp_fontsize.y * CENTERPRINT_TITLE_SPACING; else - pos.y += fontsize.y + (hud_fontsize.y * (CENTERPRINT_TITLE_SPACING / 2)); + pos.y += fontsize.y + (hud_fontsize.y * CENTERPRINT_TITLE_SPACING); drawfill(pos, vec2(width, 1), '1 1 1', 1, DRAWFLAG_NORMAL); if (autocvar_hud_panel_centerprint_flip) - pos.y -= cp_fontsize.y * (CENTERPRINT_TITLE_SPACING / 2); + pos.y -= cp_fontsize.y * CENTERPRINT_TITLE_SPACING; else - pos.y += cp_fontsize.y * (CENTERPRINT_TITLE_SPACING / 2); + pos.y += cp_fontsize.y * CENTERPRINT_TITLE_SPACING; all_messages_expired = false; } -- 2.39.2