From: Samual Date: Mon, 15 Aug 2011 08:11:22 +0000 (-0400) Subject: Add fading in animation X-Git-Tag: xonotic-v0.5.0~147 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=fdfec934c87c538ec9fc972ad946fc9e533a7044;p=xonotic%2Fxonotic-data.pk3dir.git Add fading in animation --- 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) {