mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-25 08:21:14 +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
source
|
@ -3088,12 +3088,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) << 14;// .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();
|
||||||
|
|
|
@ -497,8 +497,7 @@ void ProcessMouseMoveInGame(NSEvent* theEvent)
|
||||||
|
|
||||||
if (!m_noprescale)
|
if (!m_noprescale)
|
||||||
{
|
{
|
||||||
x *= 3;
|
x <<= 2;
|
||||||
y *= 2;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
event_t event = {};
|
event_t event = {};
|
||||||
|
|
|
@ -1030,10 +1030,9 @@ int CalcSmoothRatio(const ClockTicks &totalclk, const ClockTicks &ototalclk, int
|
||||||
{
|
{
|
||||||
const double TICRATE = 120.;
|
const double TICRATE = 120.;
|
||||||
|
|
||||||
double rfreq = refreshfreq * TICRATE / timerGetClockRate();
|
|
||||||
double elapsedTime = (totalclk - ototalclk);
|
double elapsedTime = (totalclk - ototalclk);
|
||||||
double elapsedFrames = elapsedTime * rfreq * (1. / TICRATE);
|
double elapsedFrames = elapsedTime * (1. / TICRATE);
|
||||||
double ratio = (elapsedFrames * realgameticspersec) / rfreq;
|
double ratio = (elapsedFrames * realgameticspersec);
|
||||||
return clamp(xs_RoundToInt(ratio * 65536), 0, 65536);
|
return clamp(xs_RoundToInt(ratio * 65536), 0, 65536);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue