From 3f531fbcb34633f9cba1deed4026c2242f9d61ac Mon Sep 17 00:00:00 2001 From: terencehill Date: Sun, 26 Jun 2011 23:41:05 +0200 Subject: [PATCH] Put wrapped msgs at the correct position when hud_panel_centerprint_flip is set --- qcsrc/client/hud.qc | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index da0ffbb15..f0c838e50 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -4547,15 +4547,18 @@ void HUD_CenterPrint (void) for(k = 0; k < n; ++k) { getWrappedLine_remaining = argv(k); - ts = getWrappedLine(panel_size_x * sz, fontsize, stringwidth_colors); - if (ts != "") - pos_y -= fontsize_y; - else - pos_y -= fontsize_y * 0.35; - if (pos_y < panel_pos_y) // check if the next line can be shown + while(getWrappedLine_remaining) { - drawfontscale = '1 1 0'; - return; + ts = getWrappedLine(panel_size_x * sz, fontsize, stringwidth_colors); + if (ts != "") + pos_y -= fontsize_y; + else + pos_y -= fontsize_y * 0.35; + if (pos_y < panel_pos_y) // check if the next line can be shown + { + drawfontscale = '1 1 0'; + return; + } } } current_msg_pos_y = pos_y; // save starting pos (first line) of the current message -- 2.39.2