Make the semantics of CL_VM_UpdateView more clear - if CSQC is loaded, it is required...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 7 Apr 2018 19:18:49 +0000 (19:18 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 7 Apr 2018 19:18:49 +0000 (19:18 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12367 d7cf8633-e32d-0410-b094-e92efae38249

cl_screen.c

index 771d27c..0ef9304 100644 (file)
@@ -2182,8 +2182,12 @@ static void SCR_DrawScreen (void)
                r_refdef.view.ortho_x = atan(r_refdef.view.frustum_x) * (360.0 / M_PI); // abused as angle by VM_CL_R_SetView
                r_refdef.view.ortho_y = atan(r_refdef.view.frustum_y) * (360.0 / M_PI); // abused as angle by VM_CL_R_SetView
 
-               if(!CL_VM_UpdateView(r_stereo_side ? 0.0 : max(0.0, cl.time - cl.oldtime)))
-                       R_RenderView();
+               // if CSQC is loaded, it is required to provide the CSQC_UpdateView function,
+               // and won't render a view if it does not call that.
+               if (cl.csqc_loaded)
+                       CL_VM_UpdateView(r_stereo_side ? 0.0 : max(0.0, cl.time - cl.oldtime));
+               else
+                       R_RenderView(0, NULL, NULL, r_refdef.view.x, r_refdef.view.y, r_refdef.view.width, r_refdef.view.height);
        }
 
        if (!r_stereo_sidebyside.integer && !r_stereo_horizontal.integer && !r_stereo_vertical.integer)