From 3ee18e7372d5816a59a7a3f7fbfdbee2cd775a8e Mon Sep 17 00:00:00 2001 From: Samual Date: Sun, 16 Oct 2011 01:58:29 -0400 Subject: [PATCH] ACTUALLY fix how the fading/scaling works :D --- qcsrc/client/hud.qc | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index c4c827b1d..cdfce5f48 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -4680,11 +4680,10 @@ void HUD_CenterPrint (void) a = (centerprint_expire_time[j] - time) / centerprint_fadetime; } - //a = a * bound(0.5, (1 - (i / 2)), 1); // pass one: all messages after the first have half alpha + a = a * bound(0.5, (1 - (i / 2)), 1); // pass one: all messages after the first have half alpha + a = a * bound(0.5, (1 - (i / 10)), 1); // pass two: after that, gradually lower alpha even more for each message - sz = 0.75 + a * (1 - 0.75); // set the sizing before final fading pass - - //a = a * bound(0.75, (1 - (i / 10)), 1); // pass two: after that, gradually lower alpha even more for each message + sz = 0.75 + a * (1 - 0.75); // set the sizing based on alpha //print(strcat("alpha for centerprint ", ftos(i), ": ", ftos(a), ".\n")); @@ -4746,13 +4745,13 @@ void HUD_CenterPrint (void) { pos_y = current_msg_pos_y - CENTERPRINT_SPACING * fontsize_y; if (a < 1 && centerprint_msgID[j] == 0) // messages with id can be replaced just after they are faded out, so never move over them the next messages - pos_y += (msg_size + CENTERPRINT_SPACING * fontsize_y); + pos_y += (msg_size + CENTERPRINT_SPACING * fontsize_y) * (1 - sqrt(sz)); } else { pos_y += CENTERPRINT_SPACING * fontsize_y; if (a < 1 && centerprint_msgID[j] == 0) // messages with id can be replaced just after they are faded out, so never move over them the next messages - pos_y -= (msg_size + CENTERPRINT_SPACING * fontsize_y); + pos_y -= (msg_size + CENTERPRINT_SPACING * fontsize_y) * (1 - sqrt(sz)); } } drawfontscale = '1 1 0'; -- 2.39.2