From 11279e294fa4b5759195d32b2afa2172b55e1f6d Mon Sep 17 00:00:00 2001 From: havoc Date: Sat, 7 Apr 2018 19:18:49 +0000 Subject: [PATCH] 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 --- cl_screen.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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) -- 2.39.2