r5304 - trunk/data/qcsrc/client

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Wed Dec 24 18:10:38 EST 2008


Author: div0
Date: 2008-12-24 18:10:38 -0500 (Wed, 24 Dec 2008)
New Revision: 5304

Modified:
   trunk/data/qcsrc/client/teamradar.qc
Log:
fix size of minimap


Modified: trunk/data/qcsrc/client/teamradar.qc
===================================================================
--- trunk/data/qcsrc/client/teamradar.qc	2008-12-24 22:48:53 UTC (rev 5303)
+++ trunk/data/qcsrc/client/teamradar.qc	2008-12-24 23:10:38 UTC (rev 5304)
@@ -6,6 +6,11 @@
 float cl_teamradar_scale; // window size = ...qu
 float v_flipped;
 
+float vlen2d(vector v)
+{
+	return sqrt(v_x * v_x + v_y * v_y);
+}
+
 float vlen_maxnorm2d(vector v)
 {
 	return max4(v_x, v_y, -v_x, -v_y);
@@ -265,7 +270,7 @@
 	if(cl_teamradar_rotation == 0)
 	{
 		// max-min distance must fit the radar in any rotation
-		bigsize = vlen_minnorm2d(teamradar_size2d) * scale2d / (1.05 * vlen(mi_max - mi_min));
+		bigsize = vlen_minnorm2d(teamradar_size2d) * scale2d / (1.05 * vlen2d(mi_max - mi_min));
 	}
 	else
 	{




More information about the nexuiz-commits mailing list