[nexuiz-commits] r8508 - in trunk/data/qcsrc: client server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Sat Jan 16 15:30:17 EST 2010


Author: fruitiex
Date: 2010-01-16 15:30:17 -0500 (Sat, 16 Jan 2010)
New Revision: 8508

Modified:
   trunk/data/qcsrc/client/sbar.qc
   trunk/data/qcsrc/server/race.qc
Log:
increase size of the badge, fix the code


Modified: trunk/data/qcsrc/client/sbar.qc
===================================================================
--- trunk/data/qcsrc/client/sbar.qc	2010-01-16 20:25:42 UTC (rev 8507)
+++ trunk/data/qcsrc/client/sbar.qc	2010-01-16 20:30:17 UTC (rev 8508)
@@ -1588,11 +1588,11 @@
 	a = bound(0, race_status_time - time, 1);
 
 	if(race_status == 0)
-		drawpic(pos, "gfx/hud/race/newtime", '50 50 0', '1 1 1', sbar_alpha_fg * a, DRAWFLAG_NORMAL);
+		drawpic(pos, "gfx/hud/race/newtime", '80 80 0', '1 1 1', sbar_alpha_fg * a, DRAWFLAG_NORMAL);
 	else if(race_status == 1)
-		drawpic(pos, "gfx/hud/race/newrank", '50 50 0', '1 1 1', sbar_alpha_fg * a, DRAWFLAG_NORMAL);
+		drawpic(pos, "gfx/hud/race/newrank", '80 80 0', '1 1 1', sbar_alpha_fg * a, DRAWFLAG_NORMAL);
 	else if(race_status == 2)
-		drawpic(pos, "gfx/hud/race/newrecord", '50 50 0', '1 1 1', sbar_alpha_fg * a, DRAWFLAG_NORMAL);
+		drawpic(pos, "gfx/hud/race/newrecord", '80 80 0', '1 1 1', sbar_alpha_fg * a, DRAWFLAG_NORMAL);
 
 	if (race_status_time - time <= 0) {
 		race_status_prev = -1;

Modified: trunk/data/qcsrc/server/race.qc
===================================================================
--- trunk/data/qcsrc/server/race.qc	2010-01-16 20:25:42 UTC (rev 8507)
+++ trunk/data/qcsrc/server/race.qc	2010-01-16 20:30:17 UTC (rev 8508)
@@ -193,13 +193,16 @@
 	WriteInt24_t(msg, race_GetTime(pos));
 }
 
-void race_SendStatus(float id)
+void race_SendStatus(float id, entity e)
 {
 	float msg = MSG_ONE;
-	WriteByte(msg, SVC_TEMPENTITY);
-	WriteByte(msg, TE_CSQC_RACE);
-	WriteByte(msg, RACE_NET_SERVER_STATUS);
-	WriteShort(msg, id);
+	msg_entity = e;
+	WRITESPECTATABLE_MSG_ONE_VARNAME(dummy3, {
+		WriteByte(msg, SVC_TEMPENTITY);
+		WriteByte(msg, TE_CSQC_RACE);
+		WriteByte(msg, RACE_NET_SERVER_STATUS);
+		WriteShort(msg, id);
+	});
 }
 
 string race_PlaceName(float pos) {
@@ -335,24 +338,24 @@
 		if(pos == prevpos) {
 			recorddifference = strcat(" ^2[-", TIME_ENCODED_TOSTRING(oldrec - t), "]");
 			bprint(e.netname, "^1 improved their 1st place record with ", TIME_ENCODED_TOSTRING(t), recorddifference, "\n");
-			race_SendStatus(2); // "new record"
+			race_SendStatus(2, e); // "new record"
 		} else {
 			recorddifference = strcat(" ^2[-", TIME_ENCODED_TOSTRING(oldrec - t), "]");
 			bprint(e.netname, "^1 broke ", grecordholder[pos], "^1's 1st place record with ", strcat(TIME_ENCODED_TOSTRING(t), recorddifference, "\n"));
-			race_SendStatus(2); // "new record"
+			race_SendStatus(2, e); // "new record"
 		}
 	} else {
 		if(pos == prevpos) {
 			recorddifference = strcat(" ^2[-", TIME_ENCODED_TOSTRING(oldrec - t), "]");
 			bprint(e.netname, "^3 improved their ", race_PlaceName(pos), " ^3place record with ", TIME_ENCODED_TOSTRING(t), recorddifference, "\n");
-			race_SendStatus(0); // "new time"
+			race_SendStatus(0, e); // "new time"
 		} else if (oldrec == 0) {
 			bprint(e.netname, "^2 set the ", race_PlaceName(pos), " ^2place record with ", TIME_ENCODED_TOSTRING(t), "\n");
-			race_SendStatus(1); // "new rank"
+			race_SendStatus(1, e); // "new rank"
 		} else {
 			recorddifference = strcat(" ^2[-", TIME_ENCODED_TOSTRING(oldrec - t), "]");
 			bprint(e.netname, "^2 broke ", grecordholder[pos], "^2's ", race_PlaceName(pos), " ^2place record with ", strcat(TIME_ENCODED_TOSTRING(t), recorddifference, "\n"));
-			race_SendStatus(1); // "new rank"
+			race_SendStatus(1, e); // "new rank"
 		}
 	}
 }



More information about the nexuiz-commits mailing list