- use the common interpolation function for Blood.

This keeps the main calculation for time difference in one place.
This commit is contained in:
Christoph Oelckers 2020-07-14 12:48:56 +02:00
parent 893686709b
commit 9caf1ead91

View file

@ -3094,12 +3094,10 @@ void viewDrawScreen(bool sceneonly)
lastUpdate = totalclock; lastUpdate = totalclock;
if (!paused && (!M_Active() || gGameOptions.nGameType != 0)) if (!paused && (!M_Active() || gGameOptions.nGameType != 0))
{ {
gInterpolate = ((totalclock-gNetFifoClock)+4).toScale16()/4; gInterpolate = CalcSmoothRatio(totalclock, gNetFifoClock - 4, 30);
}
if (gInterpolate < 0 || gInterpolate > 65536)
{
gInterpolate = ClipRange(gInterpolate, 0, 65536);
} }
else gInterpolate = 65536;
if (cl_interpolate) if (cl_interpolate)
{ {
CalcInterpolations(); CalcInterpolations();