r4604 - trunk/data/qcsrc/client

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Fri Oct 3 09:28:24 EDT 2008


Author: div0
Date: 2008-10-03 09:28:23 -0400 (Fri, 03 Oct 2008)
New Revision: 4604

Modified:
   trunk/data/qcsrc/client/View.qc
   trunk/data/qcsrc/client/teamradar.qc
Log:
make "cl_teamradar 2" use the new radar in Onslaught too, overriding ons_map (for testing)


Modified: trunk/data/qcsrc/client/View.qc
===================================================================
--- trunk/data/qcsrc/client/View.qc	2008-10-03 11:33:37 UTC (rev 4603)
+++ trunk/data/qcsrc/client/View.qc	2008-10-03 13:28:23 UTC (rev 4604)
@@ -329,17 +329,22 @@
 	
 	if(gametype == GAME_ONSLAUGHT)
 	{
+		if(cvar("cl_teamradar") >= 2)
+		{
+			if(!scoreboard_active)
+				teamradar_view();
+		}
+		else
+			ons_view();
 		//drawstring('0 0', minimapname, '8 8 0', '1 1 1', 1, 0);
 		//drawsetcliparea(0,0,800,600);
-		ons_view();
 		//drawresetcliparea();
 	}
 	else if(teamplay)
 	{
-		//if(intermission != 1)
-		//if(intermission != 2)
-		if(!scoreboard_active)
-			teamradar_view();
+		if(cvar("cl_teamradar") >= 1)
+			if(!scoreboard_active)
+				teamradar_view();
 	}
 }
 

Modified: trunk/data/qcsrc/client/teamradar.qc
===================================================================
--- trunk/data/qcsrc/client/teamradar.qc	2008-10-03 11:33:37 UTC (rev 4603)
+++ trunk/data/qcsrc/client/teamradar.qc	2008-10-03 13:28:23 UTC (rev 4604)
@@ -29,7 +29,7 @@
 
 vector yinvert(vector v)
 {
-	v_y = -v_y;
+	v_y = 1 - v_y;
 	return v;
 }
 
@@ -44,6 +44,7 @@
 	R_PolygonVertex('1 0 0' * (teamradar_origin2d_x + teamradar_size2d_x * 0.5) + '0 1 0' * (teamradar_origin2d_y + teamradar_size2d_y * 0.5), '0 0 0', '0 0 0', a);
 	R_PolygonVertex('1 0 0' * (teamradar_origin2d_x - teamradar_size2d_x * 0.5) + '0 1 0' * (teamradar_origin2d_y + teamradar_size2d_y * 0.5), '0 0 0', '0 0 0', a);
 	R_EndPolygon();
+
 	R_BeginPolygon(minimapname, DRAWFLAG_ADDITIVE);
 	R_PolygonVertex(teamradar_texcoord_to_2dcoord(mi_pictexcoord0), yinvert(mi_pictexcoord0), '1 1 1', 1);
 	R_PolygonVertex(teamradar_texcoord_to_2dcoord(mi_pictexcoord1), yinvert(mi_pictexcoord1), '1 1 1', 1);
@@ -110,9 +111,6 @@
 	float scale2d, normalsize, bigsize;
 	float a, f;
 
-	if(!cvar("cl_teamradar"))
-		return;
-
 	color = GetPlayerColor(player_localentnum-1);
 	rgb = GetTeamRGB(color);
 




More information about the nexuiz-commits mailing list