From fdfec934c87c538ec9fc972ad946fc9e533a7044 Mon Sep 17 00:00:00 2001 From: Samual Date: Mon, 15 Aug 2011 04:11:22 -0400 Subject: [PATCH] Add fading in animation --- qcsrc/client/hud.qc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index 57f098383..8fdd77478 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -4544,10 +4544,12 @@ void HUD_CenterPrint (void) else continue; } + + //print("testing: ", ftos(time - (centerprint_expire_time[j] - centerprint_time[j])), ". \n"); if (centerprint_time[j] < 0 || centerprint_expire_time[j] - centerprint_fadetime > time) { - a = 1; - sz = 1; + 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) { -- 2.39.2