mirror of
https://github.com/ZDoom/Raze.git
synced 2025-05-30 17:01:03 +00:00
- reverted ClockTicks to an integer so that interpolation can be reimplemented without it affecting the global game timer.
The entire method at use here is essentially not correct. Interpolation should be handled independently of the game timer directly based on the underlying clock, like in ZDoom. There's interpolation bugs in the Build games that cannot be fixed if totalclock is used for it, but if we use something else we do not need a fractional totalclock.
This commit is contained in:
parent
a24034e087
commit
481ac965cf
4 changed files with 6 additions and 4 deletions
|
@ -1031,13 +1031,12 @@ int CalcSmoothRatio(const ClockTicks &totalclk, const ClockTicks &ototalclk, int
|
|||
const double TICRATE = 120.;
|
||||
|
||||
double rfreq = refreshfreq * TICRATE / timerGetClockRate();
|
||||
double elapsedTime = (totalclk - ototalclk).toScale16F();
|
||||
double elapsedTime = (totalclk - ototalclk);
|
||||
double elapsedFrames = elapsedTime * rfreq * (1. / TICRATE);
|
||||
double ratio = (elapsedFrames * realgameticspersec) / rfreq;
|
||||
return clamp(xs_RoundToInt(ratio * 65536), 0, 65536);
|
||||
}
|
||||
|
||||
|
||||
FString G_GetDemoPath()
|
||||
{
|
||||
FString path = M_GetDemoPath();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue