r5102 - trunk/data/qcsrc/client

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Wed Nov 26 04:20:36 EST 2008


Author: div0
Date: 2008-11-26 04:20:21 -0500 (Wed, 26 Nov 2008)
New Revision: 5102

Modified:
   trunk/data/qcsrc/client/waypointsprites.qc
Log:
alternate way to project waypoint sprites that are out of the screen


Modified: trunk/data/qcsrc/client/waypointsprites.qc
===================================================================
--- trunk/data/qcsrc/client/waypointsprites.qc	2008-11-26 08:52:48 UTC (rev 5101)
+++ trunk/data/qcsrc/client/waypointsprites.qc	2008-11-26 09:20:21 UTC (rev 5102)
@@ -142,8 +142,14 @@
 		// scale it to be just in view
 		vector d;
 		float f1, f2;
-		d = o - '0.5 0 0' * vid_conwidth - '0 0.5 0' * vid_conheight;
 
+		// get the waypoint angle vector
+		d_x = view_right * (self.origin - view_origin) * cvar("vid_pixelheight") * vid_conwidth / vid_width;
+		d_y = -view_up * (self.origin - view_origin) * vid_conheight / vid_height;
+		d_z = 0;
+		
+		//d = o - '0.5 0 0' * vid_conwidth - '0 0.5 0' * vid_conheight;
+
 		f1 = d_x / vid_conwidth;
 		f2 = d_y / vid_conheight;
 




More information about the nexuiz-commits mailing list