]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
set ortho_x and ortho_y, forgot this before
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 15 Jun 2007 21:17:57 +0000 (21:17 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 15 Jun 2007 21:17:57 +0000 (21:17 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7430 d7cf8633-e32d-0410-b094-e92efae38249

clvm_cmds.c

index 5b0254227a4a573c7f5f6729ff350bf18d82d4f4..404de740d142674c7ce82d44c9fe107e15562973 100644 (file)
@@ -631,6 +631,8 @@ static void VM_CL_R_ClearScene (void)
        r_view.frustum_x = r_view.frustum_y * (float)r_view.width / (float)r_view.height / vid_pixelheight.value;
        r_view.frustum_x *= r_refdef.frustumscale_x;
        r_view.frustum_y *= r_refdef.frustumscale_y;
+       r_view.ortho_x = scr_fov.value * (3.0 / 4.0) * (float)r_view.width / (float)r_view.height / vid_pixelheight.value;
+       r_view.ortho_y = scr_fov.value * (3.0 / 4.0);
        // FIXME: restore cl.csqc_origin
        // FIXME: restore cl.csqc_angles
        cl.csqc_vidvars.drawworld = true;
@@ -711,12 +713,12 @@ static void VM_CL_R_SetView (void)
                                                        r_view.width = (int)(f[0] * vid.width / vid_conwidth.value);
                                                        r_view.height = (int)(f[1] * vid.height / vid_conheight.value);
                                                        break;
-       case VF_FOV:                    r_view.frustum_x = tan(f[0] * M_PI / 360.0);
-                                                       r_view.frustum_y = tan(f[1] * M_PI / 360.0);
+       case VF_FOV:                    r_view.frustum_x = tan(f[0] * M_PI / 360.0);r_view.ortho_x = f[0];
+                                                       r_view.frustum_y = tan(f[1] * M_PI / 360.0);r_view.ortho_y = f[1];
                                                        break;
-       case VF_FOVX:                   r_view.frustum_x = tan(k * M_PI / 360.0);
+       case VF_FOVX:                   r_view.frustum_x = tan(k * M_PI / 360.0);r_view.ortho_x = k;
                                                        break;
-       case VF_FOVY:                   r_view.frustum_y = tan(k * M_PI / 360.0);
+       case VF_FOVY:                   r_view.frustum_y = tan(k * M_PI / 360.0);r_view.ortho_y = k;
                                                        break;
        case VF_ORIGIN:                 VectorCopy(f, cl.csqc_origin);
                                                        CSQC_R_RecalcView();