diff --git a/source/blood/src/view.cpp b/source/blood/src/view.cpp index f70e717f2..8597ccdd6 100644 --- a/source/blood/src/view.cpp +++ b/source/blood/src/view.cpp @@ -3088,12 +3088,10 @@ void viewDrawScreen(bool sceneonly) lastUpdate = totalclock; if (!paused && (!M_Active() || gGameOptions.nGameType != 0)) { - gInterpolate = ((totalclock - gNetFifoClock) + 4) << 14;// .toScale16() / 4; - } - if (gInterpolate < 0 || gInterpolate > 65536) - { - gInterpolate = ClipRange(gInterpolate, 0, 65536); + gInterpolate = CalcSmoothRatio(totalclock, gNetFifoClock - 4, 30); } + else gInterpolate = 65536; + if (cl_interpolate) { CalcInterpolations(); diff --git a/source/common/platform/posix/cocoa/i_input.mm b/source/common/platform/posix/cocoa/i_input.mm index 3b562bcb8..9c09cbced 100644 --- a/source/common/platform/posix/cocoa/i_input.mm +++ b/source/common/platform/posix/cocoa/i_input.mm @@ -497,8 +497,7 @@ void ProcessMouseMoveInGame(NSEvent* theEvent) if (!m_noprescale) { - x *= 3; - y *= 2; + x <<= 2; } event_t event = {}; diff --git a/source/core/gamecontrol.cpp b/source/core/gamecontrol.cpp index cee6208c3..1c67588c9 100644 --- a/source/core/gamecontrol.cpp +++ b/source/core/gamecontrol.cpp @@ -1030,10 +1030,9 @@ int CalcSmoothRatio(const ClockTicks &totalclk, const ClockTicks &ototalclk, int { const double TICRATE = 120.; - double rfreq = refreshfreq * TICRATE / timerGetClockRate(); double elapsedTime = (totalclk - ototalclk); - double elapsedFrames = elapsedTime * rfreq * (1. / TICRATE); - double ratio = (elapsedFrames * realgameticspersec) / rfreq; + double elapsedFrames = elapsedTime * (1. / TICRATE); + double ratio = (elapsedFrames * realgameticspersec); return clamp(xs_RoundToInt(ratio * 65536), 0, 65536); }