mirror of
https://github.com/ZDoom/Raze.git
synced 2025-05-30 17:01:03 +00:00
- create an enum for MaxSmoothRatio and replace multiple hard-coded uses of '65536' constant.
This commit is contained in:
parent
733f3aa490
commit
1cf857e788
7 changed files with 19 additions and 19 deletions
|
@ -1040,7 +1040,6 @@ void S_SetSoundPaused(int state)
|
|||
|
||||
int CalcSmoothRatio(const ClockTicks &totalclk, const ClockTicks &ototalclk, int realgameticspersec)
|
||||
{
|
||||
const int baseValue = 65536;
|
||||
uint64_t currentTime = I_nsTime();
|
||||
|
||||
if ((lastototalclk == ototalclk) && (lastTime != 0))
|
||||
|
@ -1054,7 +1053,7 @@ int CalcSmoothRatio(const ClockTicks &totalclk, const ClockTicks &ototalclk, int
|
|||
}
|
||||
lastTime = currentTime;
|
||||
|
||||
return clamp(baseValue * (elapsedTime / (1'000'000'000. / realgameticspersec)), 0, baseValue);
|
||||
return clamp(MaxSmoothRatio * (elapsedTime / (1'000'000'000. / realgameticspersec)), 0, MaxSmoothRatio);
|
||||
}
|
||||
|
||||
FString G_GetDemoPath()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue