r5105 - trunk/data/qcsrc/client
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Wed Nov 26 04:41:12 EST 2008
Author: div0
Date: 2008-11-26 04:41:10 -0500 (Wed, 26 Nov 2008)
New Revision: 5105
Modified:
trunk/data/qcsrc/client/View.qc
trunk/data/qcsrc/client/main.qh
trunk/data/qcsrc/client/waypointsprites.qc
Log:
vid_pixelheight now is a float
Modified: trunk/data/qcsrc/client/View.qc
===================================================================
--- trunk/data/qcsrc/client/View.qc 2008-11-26 09:39:57 UTC (rev 5104)
+++ trunk/data/qcsrc/client/View.qc 2008-11-26 09:41:10 UTC (rev 5105)
@@ -175,7 +175,7 @@
float frustumx, frustumy, fovx, fovy;
frustumy = tan(fov * 0.00872664625997164788) * 0.75 * current_viewzoom;
- frustumx = frustumy * vid_width / vid_height / cvar("vid_pixelheight");
+ frustumx = frustumy * vid_width / vid_height / vid_pixelheight;
fovx = atan2(frustumx, 1) / 0.00872664625997164788;
fovy = atan2(frustumy, 1) / 0.00872664625997164788;
@@ -292,6 +292,7 @@
// Set the console size vars
vid_conwidth = cvar("vid_conwidth");
vid_conheight = cvar("vid_conheight");
+ vid_pixelheight = cvar("vid_pixelheight");
// fetch this one only once per frame
sbar_showbinds = cvar("sbar_showbinds");
Modified: trunk/data/qcsrc/client/main.qh
===================================================================
--- trunk/data/qcsrc/client/main.qh 2008-11-26 09:39:57 UTC (rev 5104)
+++ trunk/data/qcsrc/client/main.qh 2008-11-26 09:41:10 UTC (rev 5105)
@@ -139,4 +139,4 @@
float current_zoomfraction;
float cs_project_is_b0rked;
-float vid_width, vid_height;
+float vid_width, vid_height, vid_pixelheight;
Modified: trunk/data/qcsrc/client/waypointsprites.qc
===================================================================
--- trunk/data/qcsrc/client/waypointsprites.qc 2008-11-26 09:39:57 UTC (rev 5104)
+++ trunk/data/qcsrc/client/waypointsprites.qc 2008-11-26 09:41:10 UTC (rev 5105)
@@ -144,8 +144,8 @@
float f1, f2;
// 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_x = view_right * (self.origin - view_origin) * vid_conwidth / vid_width;
+ d_y = -view_up * (self.origin - view_origin) * vid_conheight / (vid_height * vid_pixelheight);
d_z = 0;
//d = o - '0.5 0 0' * vid_conwidth - '0 0.5 0' * vid_conheight;
More information about the nexuiz-commits
mailing list