]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Add fading in animation
authorSamual <samual@xonotic.org>
Mon, 15 Aug 2011 08:11:22 +0000 (04:11 -0400)
committerSamual <samual@xonotic.org>
Mon, 15 Aug 2011 08:11:22 +0000 (04:11 -0400)
qcsrc/client/hud.qc

index 57f098383db97dad24c62431889daae3fb1048fe..8fdd77478f03a6c92df3c91b73a2dd3d130b30de 100644 (file)
@@ -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)
                {