From: terencehill Date: Thu, 19 May 2011 13:20:10 +0000 (+0200) Subject: Optimize centerprint drawing X-Git-Tag: xonotic-v0.5.0~233 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=14efa39eaddeb8adf87192ad101f1262168ecad0;p=xonotic%2Fxonotic-data.pk3dir.git 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 --- 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) {