From: havoc Date: Sat, 7 Apr 2018 19:18:49 +0000 (+0000) Subject: Make the semantics of CL_VM_UpdateView more clear - if CSQC is loaded, it is required... X-Git-Tag: xonotic-v0.8.5~44 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=57b1147864bc8633d27dc8e36086023bc37bf3a6;p=xonotic%2Fdarkplaces.git Make the semantics of CL_VM_UpdateView more clear - 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, so we don't need to check its return value. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12367 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=11279e294fa4b5759195d32b2afa2172b55e1f6d --- diff --git a/cl_screen.c b/cl_screen.c index 771d27c9..0ef93047 100644 --- a/cl_screen.c +++ b/cl_screen.c @@ -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)