[nexuiz-commits] r8118 - trunk/data/qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Tue Oct 13 08:02:15 EDT 2009
Author: fruitiex
Date: 2009-10-13 08:02:14 -0400 (Tue, 13 Oct 2009)
New Revision: 8118
Modified:
trunk/data/qcsrc/server/race.qc
Log:
add more information to the record bprints (eg. previous record if broken, difference from server record)
Modified: trunk/data/qcsrc/server/race.qc
===================================================================
--- trunk/data/qcsrc/server/race.qc 2009-10-13 10:52:34 UTC (rev 8117)
+++ trunk/data/qcsrc/server/race.qc 2009-10-13 12:02:14 UTC (rev 8118)
@@ -168,7 +168,7 @@
if(cp == race_timed_checkpoint)
{
float grecordtime;
- string grecordholder;
+ string grecordholder, recorddifference;
string rr;
if(g_cts)
rr = CTS_RECORD;
@@ -188,10 +188,11 @@
}
else if(t < grecordtime)
{
+ recorddifference = strcat("^2", " [-", TIME_ENCODED_TOSTRING(grecordtime-t), "]");
if(grecordholder == "")
- bprint(e.netname, "^7 broke their all-time fastest lap record ", TIME_ENCODED_TOSTRING(grecordtime), " with ", TIME_ENCODED_TOSTRING(t), "\n");
+ bprint(e.netname, strcat("^7 broke their all-time fastest lap record ", TIME_ENCODED_TOSTRING(grecordtime), " with ", TIME_ENCODED_TOSTRING(t), recorddifference), "\n");
else
- bprint(e.netname, "^7 broke ", grecordholder, "^7's all-time fastest lap record ", TIME_ENCODED_TOSTRING(grecordtime), " with ", TIME_ENCODED_TOSTRING(t), "\n");
+ bprint(e.netname, strcat("^7 broke ", grecordholder, "^7's all-time fastest lap record ", TIME_ENCODED_TOSTRING(grecordtime), " with ", TIME_ENCODED_TOSTRING(t), recorddifference), "\n");
db_put(ServerProgsDB, strcat(GetMapname(), rr, "time"), ftos(t));
db_put(ServerProgsDB, strcat(GetMapname(), rr, "netname"), e.netname);
write_recordmarker(e, time - TIME_DECODE(t), TIME_DECODE(t));
@@ -199,10 +200,11 @@
}
else
{
+ recorddifference = strcat("^1", " [+", TIME_ENCODED_TOSTRING(t-grecordtime), "]");
if(grecordholder == "")
- bprint(e.netname, "^7's new fastest lap could not break their all-time fastest lap record of ", TIME_ENCODED_TOSTRING(grecordtime), "\n");
+ bprint(e.netname, strcat("^7's new fastest lap ", TIME_ENCODED_TOSTRING(t), " could not break their all-time fastest lap record of ", TIME_ENCODED_TOSTRING(grecordtime), recorddifference), "\n");
else
- bprint(e.netname, "^7's new fastest lap could not break ", grecordholder, "^7's all-time fastest lap record of ", TIME_ENCODED_TOSTRING(grecordtime), "\n");
+ bprint(e.netname, strcat("^7's new fastest lap ", TIME_ENCODED_TOSTRING(t), " could not break ", grecordholder, "^7's all-time fastest lap record of ", TIME_ENCODED_TOSTRING(grecordtime), recorddifference), "\n");
}
}
More information about the nexuiz-commits
mailing list