From: Samual Date: Mon, 26 Sep 2011 04:17:31 +0000 (-0400) Subject: New fading effect for centerprints -- not done yet, still need to add configuration... X-Git-Tag: xonotic-v0.6.0~35^2~78^2~7^2~65 X-Git-Url: http://de.git.xonotic.org/?a=commitdiff_plain;h=fd00ab31602f953b54a7c90899da3d5e24d0421c;p=xonotic%2Fxonotic-data.pk3dir.git New fading effect for centerprints -- not done yet, still need to add configuration and fix a rendering bug with it. --- diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index d2ed21eeb..c4364a209 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -4603,13 +4603,14 @@ void HUD_CenterPrint (void) if (centerprint_time[j] < 0 || centerprint_expire_time[j] - centerprint_fadetime > time) { a = bound(0, (time - (centerprint_expire_time[j] - centerprint_time[j])) / centerprint_fadetime, 1); - sz = 0.8 + a * (1 - 0.8); } else if (centerprint_expire_time[j] > time) { a = (centerprint_expire_time[j] - time) / centerprint_fadetime; - sz = 0.8 + a * (1 - 0.8); } + + a = a * (bound(0.5, (1 - (i / 2)), 1) * bound(0.5, (1 - (i / 10)), 1)); + sz = 0.8 + a * (1 - 0.8); drawfontscale = sz * '1 1 0'; if (centerprint_countdown_num[j])