r5787 - trunk/data/qcsrc/client

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Fri Feb 6 10:16:50 EST 2009


Author: div0
Date: 2009-02-06 10:16:50 -0500 (Fri, 06 Feb 2009)
New Revision: 5787

Modified:
   trunk/data/qcsrc/client/sbar.qc
Log:
make centerprint messages fade out


Modified: trunk/data/qcsrc/client/sbar.qc
===================================================================
--- trunk/data/qcsrc/client/sbar.qc	2009-02-06 14:57:48 UTC (rev 5786)
+++ trunk/data/qcsrc/client/sbar.qc	2009-02-06 15:16:50 UTC (rev 5787)
@@ -1241,7 +1241,6 @@
 
 		if(race_checkpointtime)
 		{
-
 			a = bound(0, 2 - (time - race_checkpointtime), 1);
 			s = "";
 			forcetime = "";
@@ -1649,8 +1648,16 @@
 	float i;
 	vector pos;
 	string ts;
+	float a;
 
-	if(time > centerprint_expire)
+	//if(time > centerprint_expire)
+	//	return;
+	
+	//a = bound(0, 1 - 2 * (time - centerprint_expire), 1);
+	a = bound(0, 1 - 4 * (time - centerprint_expire), 1);
+	//sz = 1.2 / (a + 0.2);
+
+	if(a <= 0)
 		return;
 	
 	pos = centerprint_start;
@@ -1661,7 +1668,8 @@
 		if (ts != "")
 		{
 			dummyfunction(0, 0, 0, 0, 0, 0, 0, 0); // work around DP bug (set OFS_PARAM5 to 0)
-			drawcolorcodedstring(pos, ts, centerprint_fontsize, 1, DRAWFLAG_NORMAL);
+			drawcolorcodedstring(pos, ts, centerprint_fontsize, a, DRAWFLAG_NORMAL);
+			//  - '0 0.5 0' * (sz - 1) * centerprint_fontsize_x - '0.5 0 0' * (sz - 1) * centerprint_width[i] * centerprint_fontsize_y, centerprint_fontsize * sz
 			pos_y = pos_y + centerprint_fontsize_y;
 		}
 		else




More information about the nexuiz-commits mailing list