r6073 - in trunk/data/qcsrc: client common menu
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Sat Mar 7 11:18:22 EST 2009
Author: div0
Date: 2009-03-07 11:18:20 -0500 (Sat, 07 Mar 2009)
New Revision: 6073
Modified:
trunk/data/qcsrc/client/csqc_builtins.qc
trunk/data/qcsrc/common/gamecommand.qc
trunk/data/qcsrc/menu/mbuiltin.qh
Log:
provide access to time to cfg files
Modified: trunk/data/qcsrc/client/csqc_builtins.qc
===================================================================
--- trunk/data/qcsrc/client/csqc_builtins.qc 2009-03-07 14:49:46 UTC (rev 6072)
+++ trunk/data/qcsrc/client/csqc_builtins.qc 2009-03-07 16:18:20 UTC (rev 6073)
@@ -277,3 +277,5 @@
float(entity ent) wasfreed = #353;
entity(vector org, float rad) findradius = #22;
+
+string(float uselocaltime, string format, ...) strftime = #478;
Modified: trunk/data/qcsrc/common/gamecommand.qc
===================================================================
--- trunk/data/qcsrc/common/gamecommand.qc 2009-03-07 14:49:46 UTC (rev 6072)
+++ trunk/data/qcsrc/common/gamecommand.qc 2009-03-07 16:18:20 UTC (rev 6073)
@@ -75,6 +75,9 @@
print(" x dbins ---------------------------> : moves the top into the DB\n");
print(" dbext|dbread ----------------------> x : extract/get from the DB's cursor\n");
print(" f dbmov|dbgoto --------------------> : move or set the DB's cursor\n");
+ print(" s localtime -----------------------> s : formats the current local time\n");
+ print(" s gmtime --------------------------> s : formats the current UTC time\n");
+ print(" time ------------------------------> f : seconds since VM start\n");
print(" Set operations operate on 'such''strings'.\n");
print(" Unknown tokens insert their cvar value.\n");
print(" maplist add map\n");
@@ -611,6 +614,12 @@
rpn_error = TRUE;
}
}
+ } else if(rpncmd == "localtime") {
+ rpn_set(strftime(TRUE, rpn_get()));
+ } else if(rpncmd == "gmtime") {
+ rpn_set(strftime(FALSE, rpn_get()));
+ } else if(rpncmd == "time") {
+ rpn_pushf(time);
} else {
rpn_push(cvar_string(rpncmd));
}
Modified: trunk/data/qcsrc/menu/mbuiltin.qh
===================================================================
--- trunk/data/qcsrc/menu/mbuiltin.qh 2009-03-07 14:49:46 UTC (rev 6072)
+++ trunk/data/qcsrc/menu/mbuiltin.qh 2009-03-07 16:18:20 UTC (rev 6073)
@@ -316,6 +316,8 @@
string(string, float) netaddress_resolve = #625;
string(string search, string replace, string subject) strreplace = #484;
+string(float uselocaltime, string format, ...) strftime = #478;
+
#ifdef FIXEDFOPEN
float fopen( string filename, float mode ) =
{
More information about the nexuiz-commits
mailing list