r3971 - in trunk/data/qcsrc: client common

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Tue Jul 29 02:42:43 EDT 2008


Author: div0
Date: 2008-07-29 02:42:42 -0400 (Tue, 29 Jul 2008)
New Revision: 3971

Modified:
   trunk/data/qcsrc/client/mapvoting.qc
   trunk/data/qcsrc/common/constants.qh
Log:
fix "-1 seconds left"


Modified: trunk/data/qcsrc/client/mapvoting.qc
===================================================================
--- trunk/data/qcsrc/client/mapvoting.qc	2008-07-29 06:40:02 UTC (rev 3970)
+++ trunk/data/qcsrc/client/mapvoting.qc	2008-07-29 06:42:42 UTC (rev 3971)
@@ -139,7 +139,7 @@
 	drawstring(pos, "Vote for a map", '24 24 0', '1 1 1', 1, DRAWFLAG_NORMAL);
 	pos_y += 26;
 
-	i = ceil(mv_timeout - time);
+	i = ceil(max(0, mv_timeout - time));
 	map = strcat(ftos(i), " seconds left");
 	pos_x = center - stringwidth(map, false) * 0.5 * 16;
 	drawstring(pos, map, '16 16 0', '0 1 0', 1, DRAWFLAG_NORMAL);

Modified: trunk/data/qcsrc/common/constants.qh
===================================================================
--- trunk/data/qcsrc/common/constants.qh	2008-07-29 06:40:02 UTC (rev 3970)
+++ trunk/data/qcsrc/common/constants.qh	2008-07-29 06:42:42 UTC (rev 3971)
@@ -3,7 +3,8 @@
 // Revision 2: Mapvote preview pictures
 // Revision 3: optimized map vote protocol
 // Revision 4: CSQC config var system
-#define CSQC_REVISION 4
+// Revision 5: mapvote time fix
+#define CSQC_REVISION 5
 
 // probably put these in common/
 // so server/ and client/ can be synced better




More information about the nexuiz-commits mailing list