- fixed handling for cl_capfps and cl_nointerpolate to never use any smoothratio value other than 1.0.

This commit is contained in:
Christoph Oelckers 2021-11-29 00:40:42 +01:00
parent b54e52330c
commit 71dfe7ecfe
6 changed files with 7 additions and 7 deletions

View file

@ -82,7 +82,7 @@ void CGameMenuItemQAV::Draw(void)
duration = data->duration;
}
auto currentDuration = data->duration - duration;
auto smoothratio = I_GetTimeFrac(data->ticrate) * MaxSmoothRatio;
auto smoothratio = !cl_interpolate || cl_capfps? MaxSmoothRatio : I_GetTimeFrac(data->ticrate) * MaxSmoothRatio;
data->Play(currentDuration - data->ticksPerFrame, currentDuration, -1, NULL);

View file

@ -308,7 +308,7 @@ void qavProcessTimer(PLAYER* const pPlayer, QAV* const pQAV, int* duration, doub
{
// Apply normal values.
*duration = pQAV->duration - pPlayer->qavTimer;
*smoothratio = I_GetTimeFrac(pQAV->ticrate) * MaxSmoothRatio;
*smoothratio = !cl_interpolate || cl_capfps ? MaxSmoothRatio : I_GetTimeFrac(pQAV->ticrate) * MaxSmoothRatio;
}
}
else

View file

@ -549,7 +549,7 @@ void viewDrawScreen(bool sceneonly)
if (!paused && (!M_Active() || gGameOptions.nGameType != 0))
{
gInterpolate = I_GetTimeFrac() * MaxSmoothRatio;
gInterpolate = !cl_interpolate || cl_capfps ? MaxSmoothRatio : I_GetTimeFrac() * MaxSmoothRatio;
}
else gInterpolate = MaxSmoothRatio;
pm_smoothratio = (int)gInterpolate;

View file

@ -128,7 +128,7 @@ void GameInterface::Render()
drawtime.Reset();
drawtime.Clock();
videoSetBrightness(thunder_brightness);
double const smoothRatio = playrunning() ? I_GetTimeFrac() * MaxSmoothRatio : MaxSmoothRatio;
double const smoothRatio = !playrunning() || !cl_interpolate || cl_capfps ? MaxSmoothRatio : I_GetTimeFrac() * MaxSmoothRatio;
displayrooms(screenpeek, smoothRatio);
drawoverlays(smoothRatio);
drawtime.Unclock();

View file

@ -217,7 +217,7 @@ void DrawClock()
double calc_smoothratio()
{
if (bRecord || bPlayback || nFreeze != 0 || paused)
if (bRecord || bPlayback || nFreeze != 0 || paused || cl_capfps || !cl_interpolate)
return MaxSmoothRatio;
return I_GetTimeFrac() * MaxSmoothRatio;

View file

@ -178,7 +178,7 @@ void GameInterface::LoadGameTextures()
void GameInterface::app_init()
{
GameTicRate = 40;
GameTicRate = TICS_PER_SEC / synctics;
InitCheats();
automapping = 1;
@ -613,7 +613,7 @@ void GameInterface::Render()
}
else
{
smoothratio = I_GetTimeFrac() * MaxSmoothRatio;
smoothratio = !cl_interpolate || cl_capfps ? MaxSmoothRatio : I_GetTimeFrac() * MaxSmoothRatio;
}
drawtime.Reset();