- always calculate smoothratio while paused, but only return it during play. This is so the time keeps elapsing and you don't get a large delta between the first call back to CalcSmoothRatio() after the previous call.

This commit is contained in:
Mitchell Richters 2020-08-03 11:54:59 +10:00
parent 5792a2389a
commit 034d6e129a

View file

@ -171,11 +171,8 @@ inline bool playrunning()
inline int calc_smoothratio(ClockTicks totalclk, ClockTicks ototalclk)
{
if (!playrunning())
{
return MaxSmoothRatio;
}
return CalcSmoothRatio(totalclk, ototalclk, REALGAMETICSPERSEC);
double smoothratio = CalcSmoothRatio(totalclk, ototalclk, REALGAMETICSPERSEC);
return (playrunning() ? smoothratio : MaxSmoothRatio);
}
inline void backupplayer(player_struct* p)