From 0b1a2a76cb252cfa5facaa0184e829c3a5a0db22 Mon Sep 17 00:00:00 2001 From: Tim Angus Date: Wed, 9 Dec 2009 20:47:44 +0000 Subject: * Change FOV clamp so it's 90 horizontal degrees at 4:3 --- src/cgame/cg_view.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/cgame') 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 ); -- cgit