From 14efa39eaddeb8adf87192ad101f1262168ecad0 Mon Sep 17 00:00:00 2001 From: terencehill Date: Thu, 19 May 2011 15:20:10 +0200 Subject: [PATCH] Optimize centerprint drawing - set drawfontscale before drawing all the lines, rather than for each line - when a line isn't resized (sz == 1) use the previously calculated width (centerprint_width[i]) rather than calculate it again at every frame - network warning message in ca once per second, message is still visible all the time --- qcsrc/client/hud.qc | 9 ++++++--- qcsrc/server/arena.qc | 9 +++++++-- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index 91256b9c5..848d069f6 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -302,11 +302,14 @@ void HUD_DrawCenterPrint (void) centerprint_start_y = scoreboard_bottom + centerprint_fontsize_y; pos = centerprint_start; + drawfontscale = sz * '1 1 0'; for (i=0; i warntime) + { + FOR_EACH_PLAYER(self) + centerprint(self, strcat("^1Need at least 1 player in each team to play CA", "^7\n")); + warntime = time + 1; + } return; } else if(!next_round) { -- 2.39.2