added pause changes from stereo-quake

This commit is contained in:
Valery Guskov 2016-04-04 22:25:53 +03:00
parent 45d3dd0a2f
commit d09c942b52
2 changed files with 22 additions and 2 deletions

View file

@ -758,7 +758,15 @@ CL_CalcViewValues(void)
ops = ps; /* don't interpolate */
}
lerp = cl.lerpfrac;
if(cl_paused->value){
lerp = 1.0f;
}
else
{
lerp = cl.lerpfrac;
}
/* calculate the origin */
if ((cl_predict->value) && !(cl.frame.playerstate.pmove.pm_flags & PMF_NO_PREDICTION))

View file

@ -585,7 +585,19 @@ V_RenderView(float stereo_separation)
qsort(cl.refdef.entities, cl.refdef.num_entities,
sizeof(cl.refdef.entities[0]), (int (*)(const void *, const void *))
entitycmpfnc);
}
} else if (cl.frame.valid && cl_paused->value && cl_stereo->value) {
// We need to adjust the refdef in stereo mode when paused.
vec3_t tmp;
CL_CalcViewValues();
VectorScale( cl.v_right, stereo_separation, tmp );
VectorAdd( cl.refdef.vieworg, tmp, cl.refdef.vieworg );
cl.refdef.vieworg[0] += 1.0/16;
cl.refdef.vieworg[1] += 1.0/16;
cl.refdef.vieworg[2] += 1.0/16;
cl.refdef.time = cl.time*0.001;
}
cl.refdef.x = scr_vrect.x;
cl.refdef.y = scr_vrect.y;