summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2009-12-09 20:47:44 +0000
committerTim Angus <tim@ngus.net>2013-01-03 00:17:24 +0000
commit0b1a2a76cb252cfa5facaa0184e829c3a5a0db22 (patch)
treea2f8d72f4c5b0c53cd7fffd12458e56ba4c2cc66
parent29fd44bde9c343e1ef72498a1372243831eb290e (diff)
* Change FOV clamp so it's 90 horizontal degrees at 4:3
-rw-r--r--src/cgame/cg_view.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cgame/cg_view.c b/src/cgame/cg_view.c
index 9c890f72..ed74e9cb 100644
--- a/src/cgame/cg_view.c
+++ b/src/cgame/cg_view.c
@@ -839,7 +839,7 @@ Fixed fov at intermissions, otherwise account for fov variable and zooms.
#define WAVE_FREQUENCY 0.4f
#define FOVWARPTIME 400.0f
-#define BASE_FOV_Y 67.5f
+#define BASE_FOV_Y 73.739792f // atan2( 3, 4 / tan( 90 ) )
#define MAX_FOV_Y 120.0f
#define MAX_FOV_WARP_Y 127.5f
@@ -953,9 +953,9 @@ static int CG_CalcFov( void )
}
}
- y = cg.refdef.height / tan( fov_y / 360.0f * M_PI );
+ y = cg.refdef.height / tan( 0.5f * DEG2RAD( fov_y ) );
fov_x = atan2( cg.refdef.width, y );
- fov_x = fov_x * 360.0f / M_PI;
+ fov_x = 2.0f * RAD2DEG( fov_x );
// warp if underwater
contents = CG_PointContents( cg.refdef.vieworg, -1 );