]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
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)
committerRudolf Polzer <divVerent@xonotic.org>
Fri, 3 Aug 2018 17:23:19 +0000 (17:23 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12367 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=11279e294fa4b5759195d32b2afa2172b55e1f6d

cl_screen.c

index 771d27c927ece82b57722d31cfbaa212454ca4ae..0ef93047a3f4247388044dae298cd8d14032ed4a 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)