mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-28 12:30:46 +00:00
Merge branch 'master' into back_to_basics2
# Conflicts: # source/blood/src/view.cpp # source/core/gamecontrol.cpp
This commit is contained in:
commit
a93ed1e502
3 changed files with 6 additions and 10 deletions
|
@ -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();
|
||||
|
|
|
@ -497,8 +497,7 @@ void ProcessMouseMoveInGame(NSEvent* theEvent)
|
|||
|
||||
if (!m_noprescale)
|
||||
{
|
||||
x *= 3;
|
||||
y *= 2;
|
||||
x <<= 2;
|
||||
}
|
||||
|
||||
event_t event = {};
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue