r6075 - in branches/nexuiz-2.0: . data/qcsrc/client data/qcsrc/common data/qcsrc/menu

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Sat Mar 7 11:52:05 EST 2009


Author: div0
Date: 2009-03-07 11:52:05 -0500 (Sat, 07 Mar 2009)
New Revision: 6075

Modified:
   branches/nexuiz-2.0/.patchsets
   branches/nexuiz-2.0/data/qcsrc/client/View.qc
   branches/nexuiz-2.0/data/qcsrc/client/csqc_builtins.qc
   branches/nexuiz-2.0/data/qcsrc/common/gamecommand.qc
   branches/nexuiz-2.0/data/qcsrc/menu/mbuiltin.qh
Log:
r6073 | div0 | 2009-03-07 17:18:20 +0100 (Sat, 07 Mar 2009) | 2 lines
provide access to time to cfg files
r6074 | div0 | 2009-03-07 17:37:34 +0100 (Sat, 07 Mar 2009) | 2 lines
fix logic of radar showing


Modified: branches/nexuiz-2.0/.patchsets
===================================================================
--- branches/nexuiz-2.0/.patchsets	2009-03-07 16:37:34 UTC (rev 6074)
+++ branches/nexuiz-2.0/.patchsets	2009-03-07 16:52:05 UTC (rev 6075)
@@ -1,2 +1,2 @@
 master = svn://svn.icculus.org/nexuiz/trunk
-revisions_applied = 1-6071
+revisions_applied = 1-6074

Modified: branches/nexuiz-2.0/data/qcsrc/client/View.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/client/View.qc	2009-03-07 16:37:34 UTC (rev 6074)
+++ branches/nexuiz-2.0/data/qcsrc/client/View.qc	2009-03-07 16:52:05 UTC (rev 6075)
@@ -407,11 +407,22 @@
 	self = e;
 	
 	// draw radar
-	if(teamplay || cvar("cl_teamradar") == 2)
-	{
-		if((cvar_string("cl_teamradar") != "0" && !scoreboard_active) || ons_showmap)
-			teamradar_view();
-	}
+	if(
+		ons_showmap
+		||
+		(
+			!scoreboard_active
+			&&
+			cvar_string("cl_teamradar") != "0"
+			&&
+			(
+				cvar("cl_teamradar") == 2
+				||
+				teamplay
+			)
+		)
+	)
+		teamradar_view();
 
 	if (cvar("cl_showpressedkeys")) // draw pressed keys when spectating and playing
 	{

Modified: branches/nexuiz-2.0/data/qcsrc/client/csqc_builtins.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/client/csqc_builtins.qc	2009-03-07 16:37:34 UTC (rev 6074)
+++ branches/nexuiz-2.0/data/qcsrc/client/csqc_builtins.qc	2009-03-07 16:52:05 UTC (rev 6075)
@@ -277,3 +277,5 @@
 float(entity ent) wasfreed = #353;
 
 entity(vector org, float rad) findradius = #22;
+
+string(float uselocaltime, string format, ...) strftime = #478;

Modified: branches/nexuiz-2.0/data/qcsrc/common/gamecommand.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/common/gamecommand.qc	2009-03-07 16:37:34 UTC (rev 6074)
+++ branches/nexuiz-2.0/data/qcsrc/common/gamecommand.qc	2009-03-07 16:52:05 UTC (rev 6075)
@@ -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: branches/nexuiz-2.0/data/qcsrc/menu/mbuiltin.qh
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/menu/mbuiltin.qh	2009-03-07 16:37:34 UTC (rev 6074)
+++ branches/nexuiz-2.0/data/qcsrc/menu/mbuiltin.qh	2009-03-07 16:52:05 UTC (rev 6075)
@@ -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