Fix r_scale with csqc active.

This commit is contained in:
Shpoike 2021-05-11 00:53:16 +01:00
parent c59f3e56f6
commit bfb0f04708
2 changed files with 7 additions and 2 deletions

View file

@ -484,7 +484,10 @@ void R_SetupGL (void)
int scale;
//johnfitz -- rewrote this section
scale = CLAMP(1, (int)r_scale.value, 4); // ericw -- see R_ScaleView
if (!r_refdef.drawworld)
scale = 1; //don't rescale. we can't handle rescaling transparent parts.
else
scale = CLAMP(1, (int)r_scale.value, 4); // ericw -- see R_ScaleView
glViewport (glx + r_refdef.vrect.x,
gly + glheight - r_refdef.vrect.y - r_refdef.vrect.height,
r_refdef.vrect.width / scale,
@ -1062,7 +1065,7 @@ void R_ScaleView (void)
srcw = r_refdef.vrect.width / scale;
srch = r_refdef.vrect.height / scale;
if (scale == 1)
if (scale == 1 || !r_refdef.drawworld)
return;
// make sure texture unit 0 is selected

View file

@ -6587,6 +6587,7 @@ static void PF_cl_setproperty(void)
void R_SetupView (void);
void V_PolyBlend (void);
void R_RenderScene (void);
void R_ScaleView (void);
void SCR_DrawCrosshair (void);
float CalcFovy (float fov_x, float width, float height);
extern cvar_t scr_fov;
@ -6632,6 +6633,7 @@ static void PF_cl_renderscene(void)
R_SetupView ();
R_RenderScene ();
R_ScaleView();
if (r_refdef.drawworld)
V_PolyBlend ();