From a7417a4bde87dcdb9c1a66c00b3a3f43de2e296c Mon Sep 17 00:00:00 2001 From: Thilo Schulz Date: Wed, 10 Jun 2009 09:00:31 +0000 Subject: [PATCH] minor code cleanup --- code/renderer/tr_main.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/code/renderer/tr_main.c b/code/renderer/tr_main.c index 11d52bea..e90ec33e 100644 --- a/code/renderer/tr_main.c +++ b/code/renderer/tr_main.c @@ -513,22 +513,19 @@ R_SetupProjection void R_SetupProjection(viewParms_t *dest, float zProj, qboolean computeFrustum) { float xmin, xmax, ymin, ymax; - float width, height, stereoSep = r_stereoSeparation->value; + float width, height, stereoSep; /* * offset the view origin of the viewer for stereo rendering * by setting the projection matrix appropriately. */ - if(stereoSep != 0) - { - if(dest->stereoFrame == STEREO_LEFT) - stereoSep = zProj / r_stereoSeparation->value; - else if(dest->stereoFrame == STEREO_RIGHT) - stereoSep = zProj / -r_stereoSeparation->value; - else - stereoSep = 0; - } + if(dest->stereoFrame == STEREO_LEFT) + stereoSep = zProj / r_stereoSeparation->value; + else if(dest->stereoFrame == STEREO_RIGHT) + stereoSep = zProj / -r_stereoSeparation->value; + else + stereoSep = 0; ymax = zProj * tan(dest->fovY * M_PI / 360.0f); ymin = -ymax;